France's ambassador to Burkina Faso said on Saturday that 27 people had been killed in a militant attack on the Splendid Hotel in the capital city, Ouagadougou on Friday night.
Ambassador Gilles Thibault also said on his Twitter account that 150 people from 18 countries had been rescued from the hotel and had received medical treatment.
Al Qaeda in the Islamic Maghreb (AQIM) later claimed responsibility for the attack.
The President of Burkina Faso, Roch Marc Christian Kabore thanked international forces which had helped to end the hotel siege by al Qaeda militants.
Security sources earlier said at least 20 people were killed as police in Burkina Faso battled militants outside the Splendid Hotel in the capital Ouagadougou business district on Friday night.
The gunmen stormed the hotel, burning cars outside and firing in the air to drive back crowds before security forces arrived, prompting an intense exchange of gunfire.
One witness told Reuters that two groups of security forces entered the main lobby of the Splendid Hotel on Saturday morning in an attempt to reclaim the hotel, adding that there was no gunfire as they went in. Part of the lobby was on fire, the witness said.
The hotel is reportedly sometimes used by French troops with Operation Barkhane, a force based in Chad and set up to combat militants across Africa's vast, arid Sahel region.
The French Embassy in Ouagadougou had issued a statement on its website telling its citizens not to go outside and said it was setting up a crisis unit. Burkina Faso gained independence from France in 1960 and France has up to 200 special forces troops in the country.