Using Spanish conjunction al + infinitive/perfect infinitive = when doing/ because of doing [something]

Take the fastest path to fluent Spanish

Learn about "al" with an infinitive in Spanish

In Spanish, the conjunction "al" followed by an infinitive is used in clauses that express either When/while doing [something] or Because of doing [something]

When/while doing something

Al calentar la leche, me quemé.When I was heating up the milk, I burned myself.

Se ha desmayado al leer la noticia.She fainted while reading the news.

Because of doing something

Al terminar la sesión antes de lo previsto, pudimos volver a casa antes.Because the session finished earlier than expected, we were able to return home earlier.

Al portarse tan mal, lo expulsaron del colegio.Due to his appalling behaviour, he was expelled from school.

Bear in mind that in the second example, where the al + infinitive structure expresses the cause of something happening, al could also be followed by haber + participle, if it is referring to a past action. See El Infinitivo Compuesto.

Have a look at the previous examples but using the El Infinitivo Compuesto:

Al haber terminado la sesión antes de lo previsto, pudimos volver a casa antes.As the session finished earlier than expected, we were able to return home earlier.

Al haberse portado tan mal, lo expulsaron del colegio.Due to his appalling behaviour, he was expelled from school.

Using the Infinitivo or El Infinitivo Compuesto does not change the meaning of the sentence, therefore they are interchangeable.

Want to make sure your Spanish sounds confident? We’ll map your knowledge and give you free lessons to focus on your gaps and mistakes. Start your Brainmap today »

Examples and resources

Al haber terminado la sesión antes de lo previsto, pudimos volver a casa antes.As the session finished earlier than expected, we were able to return home earlier.
Se ha desmayado al leer la noticia.She fainted while reading the news.
Al haberse portado tan mal, lo expulsaron del colegio.Due to his appalling behaviour, he was expelled from school.
Al portarse tan mal, lo expulsaron del colegio.Due to his appalling behaviour, he was expelled from school.
Al terminar la sesión antes de lo previsto, pudimos volver a casa antes.Because the session finished earlier than expected, we were able to return home earlier.
Al calentar la leche, me quemé.When I was heating up the milk, I burned myself.
Clever stuff happening!