Security forces in Burkina Faso on Saturday took control of a hotel in the capital Ouagadougou, stormed the previous night by suspected Islamist militants who shot and killed several people.
French and U.S. forces helped to end the siege that began around 8:30 p.m. on Friday. The assault was claimed by an al-Qaeda-linked group, called al-Qaeda in the Islamic Maghreb.
Burkina Faso President Roch Marc Christian Kabore said 23 people of 18 different nationalities were killed in the 146-room Splendid Hotel and a nearby Cappuccino restaurant popular with Westerners and French soldiers based in Burkina Faso.
French ambassador Gilles Thibault put the death toll at 27 and said on Twitter that around 150 hostages had been freed.
There are reports the four assailants, including two women, were among the dead.
United Nations Secretary-General Ban Ki-moon has condemned what he called the "heinous terrorist attacks." In a statement, he extended his condolences to the families of the victims, and called on the authorities to bring those responsible for the attacks to justice.
'It was horrible'
One Cappuccino survivor said diners at first mistook the gunfire and explosions for firecrackers before two gunmen, dressed all in black and brandishing AK-47 assault rifles, burst in, firing indiscriminately.
"We heard shots, grenades, detonations. It was echoing and extremely loud. It went on for a long time," the survivor, a Slovenian social anthropologist told Reuters.
"They kept coming back and forth into Cappuccino. You'd think it was over, then they'd come back and shoot more people. They would come back and see if the white people were moving and then they would shoot them again," she said.
"My friend had a white dead person on top of her, bleeding onto her. But his body saved her," said the woman, who asked that her name not be used.
Survivor Yannick Sawadogo said they were shooting at people point blank.
"It was horrible because everyone was panicked and was lying down on the floor. There was blood everywhere," said Sawadogo.
Another survivor, French architect Ludovic who was at an outdoor bar near the Cappuccino when the attacks started, said he saw three assailants singling out white victims before running into the Splendid hotel.
Two French nationals were killed during the attacks, a French foreign ministry official said. Most of the victims were foreigners, but their countries of origin have not been released.
Minister of Security and Internal Affairs Simon Compaore said on Saturday that security forces searching nearby hotels to be sure there were no other extremists in hiding.
Separately, an Australian doctor and his wife were kidnapped overnight in the Baraboule area in the north near the border with Mali, the security ministry said. It was not clear if there was a link to the hotel attack.
The attackers torched cars and fired in the air to drive people back before entering the Splendid Hotel and taking hostages.
Security forces at the Splendid Hotel were slowed by explosives planted through the building by the militants.
A witness said major clashes ended after a period of sustained gunfire and explosions that appeared to focus on the Cappuccino restaurant early on Saturday.
Sporadic gunfire continued through the morning however. The final assailant was killed later in another nearby hotel, the Hotel Yibi, officials said.
Turmoil since 2014
While Burkina Faso has largely been spared the violence wrought by Islamic extremist groups in Mali, a Romanian national was abducted last April.
Burkina Faso, a largely Muslim country, has been in turmoil since its longtime president was ousted in a popular uprising in late 2014.
Last September, members of a presidential guard launched a coup that lasted only about a week. The transitional government returned to power until Burkina Faso's November election ushered in new leaders.
The assault follows a similar raid in November on a luxury hotel in Mali's capital Bamako which killed 20 people, including citizens of Russia, China and the United States. The Ouagadougou assault marked an expansion of operations for Islamist militants who are stepping up their activities, echoing the growth of ISIS in the Middle East.