An has exactly the same function before yā and before aktuba.

Infinitival Particles: Mā, An and Anna