Al + infinitivo: 'upon doing'

The construction al + infinitive is one of the most elegant tools in Spanish: it packs a whole temporal clause — when I arrived, upon hearing the news, as I was leaving — into just two words. Al llegar a casa, me di cuenta de que había olvidado las llaves. English needs a conjunction (when, as, upon) plus a tensed verb to say the same thing; Spanish needs al plus the bare infinitive. Once you control this construction, your Spanish stops sounding like translated English and starts sounding like Spanish.

The basic shape

The literal makeup is the contracted preposition al (= a + el, "at the") followed by an infinitive. Historically this was al introducing a verbal noun ("at the arriving home..."), and that nominal feel still explains why the verb takes the infinitive form and not a conjugated one.

Al llegar a casa, me di cuenta de que había olvidado las llaves.

When I got home, I realised I'd forgotten my keys.

Al salir del metro, llamé a mi hermana.

As I came out of the metro, I called my sister.

Al ver el accidente, paramos para ayudar.

On seeing the accident, we stopped to help.

The pattern is invariable: al never changes form (it cannot become a la, a los or a las here), and the verb that follows is always an infinitive — never a conjugated form, never a gerund.

The two readings: temporal and causal

Al + infinitive does double duty. In most contexts it is purely temporal, marking the moment one action triggers another. But it slides easily into a causal reading — given that, since, because — when the trigger explains why the main action happened. Spanish leaves both readings open, and context decides.

Temporal: when / upon / as

Al abrir la puerta, escuché un ruido extraño en la cocina.

When I opened the door, I heard a strange noise in the kitchen.

Al sonar el despertador, mi gato se subió encima de mí.

When the alarm went off, my cat climbed on top of me.

Al terminar la reunión, nos fuimos todos al bar de abajo.

When the meeting ended, we all went to the bar downstairs.

In each of these, al + infinitive marks a punctual moment: the exact instant the action of the infinitive occurred. The main clause describes what happened at — or immediately after — that moment.

Causal: since / because / given that

Al no tener experiencia, no me dieron el puesto.

Since I had no experience, they didn't give me the job.

Al ser festivo, todas las tiendas estaban cerradas.

Since it was a holiday, all the shops were closed.

Al tratarse de un menor, la policía no facilitó su nombre.

Given that he was a minor, the police didn't release his name.

When the al + infinitive clause provides the reason for the main clause rather than its time, the reading drifts toward since / because. You will see this constantly in journalism and formal writing — it is a more compact alternative to como or ya que.

💡
If you can substitute cuando ('when') and the meaning holds, the reading is temporal. If you can substitute como or ya que ('since') and the meaning holds, the reading is causal. Many sentences allow both, and Spanish is content to leave them ambiguous.

Who is the subject?

Because the infinitive carries no person ending, the subject of al + infinitive has to be recovered from context. Spanish allows three patterns.

Same subject as the main clause (the default)

Al entrar en el aula, vi a Marta en la última fila.

When I went into the classroom, I saw Marta in the back row.

The subject of entrar is the same as the subject of viyo. You don't say it twice; it's understood.

A different, explicit subject after the infinitive

Al llegar la policía, los manifestantes se dispersaron.

When the police arrived, the demonstrators dispersed.

Al terminar el árbitro el partido, el estadio entero se levantó.

When the referee ended the match, the whole stadium stood up.

Spanish lets you slot the subject in after the infinitive (al llegar la policía, not la policía al llegar). This is the standard literary order and is normal in journalism. Beginners often resist it because English does the opposite (the police arrived, subject first); learn to recognise it from the first day at B1.

A subject expressed as a pronoun

Al ver tú la situación, ¿qué hiciste?

When you saw the situation, what did you do?

Al saber nosotros la noticia, no nos lo podíamos creer.

When we heard the news, we couldn't believe it.

You can also tuck a subject pronoun in after the infinitive. This is rarer in everyday speech but standard in writing — and crucially, it is the only way to mark a person on the infinitive in standard Spanish, since (unlike Portuguese) Spanish has no personal infinitive form. Notice that with vosotros, this is the way to disambiguate a peninsular sentence: Al ver vosotros la situación, ¿qué hicisteis?

Compound infinitive: al haber + past participle

You can stack a compound infinitive after al to push the action further into the past — the equivalent of English having done X. This is a B2/C1 register and shows up mainly in formal writing.

Al haber estudiado tantos años en Alemania, habla un alemán impecable.

Having studied for so many years in Germany, he speaks impeccable German.

Al haberse retrasado el vuelo, perdimos la conexión.

The flight having been delayed, we missed our connection.

The compound version emphasises that the triggering action was completed before the main-clause action. The simple infinitive (al estudiar) leaves the time relation underspecified; the compound (al haber estudiado) pins it down.

Comparing al + infinitive with its rivals

Spanish has at least four ways to express "when X happened, Y happened." They are not all interchangeable.

ConstructionRegisterBest for
al
  • infinitive
neutral / written-leaningcompact, often slightly literary; punctual or causal trigger
cuando everyday spokenpast or habitual trigger you already know happened
cuando everyday spokenfuture trigger (cuando llegue)
en cuanto
  • subjunctive
spoken / written"as soon as" — stresses immediacy
nada más
  • infinitive
spoken"the moment X happened" — even more immediate than al

In real peninsular Spanish, you will hear cuando llegué a casa… far more often than al llegar a casa… in casual conversation. Al + infinitive carries a faintly more elevated, slightly more "finished" register — perfect for written narration, news, and reflective speech. In a friend's living room, cuando is the default.

Cuando llegué a casa, me di cuenta de que había olvidado las llaves.

When I got home, I realised I'd forgotten my keys. (spoken default)

Nada más entrar, supe que algo iba mal.

The moment I walked in, I knew something was wrong. (very immediate, colloquial)

The construction nada más + infinitive is a near-synonym of al + infinitive but stresses immediacy ("the very second"). It is highly idiomatic and worth knowing.

What al + infinitive cannot do

The construction looks tempting once you've learnt it, but it has limits.

It cannot replace a que-clause

❌ Sé al estar enfermo.

Wrong — al + inf cannot introduce the content of knowing.

✅ Sé que está enfermo.

I know that he is sick.

Al + infinitive is a time/cause adverbial, not a complement clause. You cannot use it to say I know that…, I think that…, he says that… — those need que + a conjugated verb.

It cannot be used for purpose

❌ Estudio al aprobar el examen.

Wrong — al + inf is not purpose.

✅ Estudio para aprobar el examen.

I'm studying in order to pass the exam.

If the relationship is in order to, use para + infinitive, not al + infinitive.

It does not work for hypothetical or counterfactual triggers

❌ Al ganar la lotería, viajaría por todo el mundo.

Marginal — implies the lottery win actually happened.

✅ Si ganara la lotería, viajaría por todo el mundo.

If I won the lottery, I'd travel the world.

Al + infinitive presents its trigger as factual (or, in journalism, presented-as-factual). For hypotheticals you need si + subjunctive.

A peninsular note on register

In Spain, al + infinitive is alive in everyday speech, but its frequency falls off steeply in casual register: you'll meet it constantly on the radio news, in newspaper headlines, and in formal narration ("Al conocer los resultados, el ministro convocó una rueda de prensa…"), and you'll meet it less often in a bar conversation. A common peninsular touch is to use it for slightly self-deprecating retrospective storytelling:

Al verme en el espejo después de la cena, dije: 'pero ¿qué he hecho?'

When I saw myself in the mirror after dinner, I said: 'what have I done?'

Al pillarme mi madre con el móvil en clase, me lo quitó dos semanas.

When my mother caught me with my phone in class, she took it away for two weeks.

Notice the second example: pillar is colloquial peninsular Spanish for "catch (red-handed)," and the subject mi madre sits cleanly after the infinitive. The construction handles informal lexicon perfectly well — it is the construction itself that is slightly elevated, not what you put in it.

Common Mistakes

❌ Al llegando a casa, me di cuenta.

Wrong — al takes the infinitive, never the gerund.

✅ Al llegar a casa, me di cuenta.

When I got home, I realised.

❌ A llegar a casa, me di cuenta.

Wrong — the preposition must contract with el: al, not a.

✅ Al llegar a casa, me di cuenta.

When I got home, I realised.

❌ Al yo llegar a casa, me di cuenta.

Wrong — the subject pronoun goes after the infinitive, not before.

✅ Al llegar yo a casa, me di cuenta. (or: Cuando llegué a casa, me di cuenta.)

When I got home, I realised.

❌ Al llegué a casa, me di cuenta.

Wrong — al is never followed by a conjugated verb.

✅ Al llegar a casa, me di cuenta.

When I got home, I realised.

❌ Al ganar la lotería, viajaría por el mundo.

Wrong for a hypothetical — al + inf presents the trigger as factual.

✅ Si ganara la lotería, viajaría por el mundo.

If I won the lottery, I'd travel the world.

Key takeaways

  • Al
    • infinitive = English when/upon/as soon as (temporal) or since/because (causal), packed into two words.
  • The infinitive carries no person, so the subject is either the same as the main clause (default), or written after the infinitive (al llegar la policía, al ver tú la situación).
  • Compound al haber
    • past participle pushes the trigger further into the past, useful in formal narration.
  • Slightly higher register than cuando
    • indicative; not interchangeable with para (purpose) or si (hypothesis).
  • Nada más
    • infinitive is its more emphatic cousin, meaning the moment that.

Now practice Spanish

Reading grammar gets you part of the way. The exercises are where it sticks — free, no signup needed.

Start learning Spanish

Related Topics

  • Infinitivo después de preposiciónA2The iron rule of Spanish syntax: any preposition is followed by the infinitive, never the gerund — antes de comer, sin pensar, para estudiar, después de llegar.
  • El infinitivo: visión generalA2The Spanish infinitive in one place — its three forms (simple, compound, reflexive), its three endings (-ar / -er / -ir), and the full menu of jobs it does in a sentence.
  • Subjuntivo en cláusulas temporalesB1After cuando, mientras, en cuanto, tan pronto como and hasta que with future reference, Spanish uses the subjunctive — not the present or the future indicative. Antes de que always takes subjunctive; después de que is variable but strongly subjunctive in Spain.
  • Errores: traducciones literalesB1The constituent words map but the construction doesn't. 'I'm good' (no, thanks) is NOT 'estoy bueno'. 'My name is Juan' is more naturally 'me llamo Juan'. The high-frequency calque traps for English speakers in everyday peninsular Spanish.