At least 20 people are believed to have been been killed after armed attackers stormed a hotel in the capital of Burkina Faso and attacked a nearby cafe late on Friday evening.
Al-Qaeda in the Islamic Maghreb (AQIM) has claimed responsibility for the attack.
The hostages at the besieged Splendid Hotel included the country's labour minister and many foreign citizens.
In a statement released on Saturday morning, the interior minister said 126 people were freed from the hotel, and three gunmen were killed after state forces ended the siege.
The attack on the former French colony was condemned by France's president Francois Hollande as "odious".