Al + Infinitive

Learn how to use al + infinitive in Spanish to mean “when” or “upon” doing something, with clear structures and natural examples.

  • time-expressions
  • infinitives
  • prepositions

Al + Infinitive

Al + infinitive means “when doing something” or “upon doing something.” It is used when one action happens in connection with another.

  • Al llegar a casa, llamé a mi madre. — When I got home, I called my mother.
  • Al salir del trabajo, fui al supermercado. — When I left work, I went to the supermarket.

The structure is:

al + infinitive

Remember that al is the contraction of a + el.

How to use al + infinitive

You can place the al + infinitive phrase before or after the main clause.

  • Al entrar en la habitación, vi a Marta. — When I entered the room, I saw Marta.
  • Vi a Marta al entrar en la habitación. — I saw Marta when I entered the room.

It is especially common with verbs such as:

  • llegar — to arrive
  • entrar — to enter
  • salir — to leave
  • volver — to return
  • ver — to see
  • oír — to hear
  • terminar — to finish

Examples

  • Al llegar al hotel, dejamos las maletas. — When we arrived at the hotel, we left our suitcases.
  • Al abrir la puerta, vi un paquete. — When I opened the door, I saw a package.
  • Al terminar la clase, fui a tomar un café. — When class ended, I went to get a coffee.
  • Al ver a Ana, la saludé. — When I saw Ana, I greeted her.
  • Al oír la noticia, se sorprendió. — When she heard the news, she was surprised.

Al + infinitive vs. cuando

Al + infinitive and cuando can often express a similar idea.

  • Al llegar a casa, cené.
  • Cuando llegué a casa, cené.

Both mean:

When I got home, I had dinner.

The main grammatical difference is:

  • al + infinitive uses the infinitive
  • cuando usually introduces a clause with a conjugated verb

For A2 learners, al + infinitive is a useful way to make sentences shorter and more natural.

Usually the same subject

In the most common use, the person doing the infinitive action is also the subject of the main clause.

  • Al llegar a casa, me duché. — When I got home, I took a shower.

Here, I both arrived and took a shower.

Be careful with sentences where the implied subject is unclear.

  • ✅ Al llegar a casa, vi a Ana.
  • ❌ Al llegar a casa, Ana estaba cocinando. if you mean I arrived home

The second sentence can sound as though Ana is the person who arrived. If the subjects are different, cuando + conjugated verb is usually clearer:

  • Cuando llegué a casa, Ana estaba cocinando. — When I got home, Ana was cooking.

Quick rule

Use:

al + infinitive = when / upon doing something

  • Al llegar… — When arriving / when I arrived…
  • Al salir… — When leaving / when I left…
  • Al terminar… — When finishing / when I finished…

Use cuando + conjugated verb when you need to make the subject or tense more explicit.