Two Spanish nationals kidnapped almost nine months ago by an al-Qaeda-linked group stepped out of a helicopter to freedom Monday in Burkina Faso's capital, where they were greeted by diplomats.

Roque Pascual and Albert Vilalta walked out of the chopper wearing polo shirts and khaki pants. One of them — believed to be Vilalta, who is known to have suffered bullet wounds to his leg during the kidnapping — was holding a cane.

They were handed a telephone and reporters could hear them saying "muchos gracias," or many thanks. Reporters were told that they were talking to the Spanish prime minister.

They were expected back home in Spain on Monday night.

The two aid workers were abducted on Nov. 29 by gunmen from al-Qaeda of the Islamic Maghreb while delivering supplies to poor villagers in Mauritania.

The release happened just days after a Malian who was sentenced in Mauritania for the kidnapping was extradited back to his home country. Al-Qaeda of the Islamic Maghreb, or AQIM, had demanded his return as a condition for the release of the two aid workers.

With files from CBC News