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

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.

Learn more about these related Spanish grammar topics

Examples and resources

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.


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 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 portarse tan mal, lo expulsaron del colegio.
Due to his appalling behaviour, he was expelled from school.


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


Q&A

Robin

Kwiziq community member

30 May 2018

1 reply

Hi in the Quiz q2 i had 'al haber discutido' marked wrong.. maybe that would be for 'having previously argued' & definitely in the past? Robin

Shui

Kwiziq language super star

30 May 2018

30/05/18

Hola Robin - I checked your test results and the question was multiple choice and had two correct answers: "Al discutir" and "Al haber discutido"


As you only gave one answer out of the possible two, the system awarded you half a mark (you need to give both correct answers to get a whole mark) but the message the system gives you is indeed rather misleading because it says "1 Nearly correct". I agree that you got one answer completely correct! I'll look into how we can change wording to avoid this kind of confusion in the future. 


All best


Shui


Let me take a look at that...