The siege at the Hotel Splendid in Burkina Faso's capital, Ouagadougou, ended on Saturday morning, leaving at least 23 people dead, but fighting continued at another hotel and a restaurant nearby.
Burkinabè troops, backed up by French special forces, freed 126 people from the Splendid and were trying to take the Yibi hotel and Capuccino restaurant from fighters of the al-Qaida-linked group Al Mourabitoune.
President Roch Marc Christian Kaboré visited the scene on Saturday morning.
Three jihadists, one Arab, the other two "black Africans", were killed at the Hotel Splendid, Security Minister Simon Compaoré said.
No official death toll was issued by 9.00am local time but security sources told the AFP news agency that at least 23 people from 18 countries had been killed.
Among the 126 people freed was Labour Minister Clément Sawadago, who had been at the hotel when the attack took place on Friday evening.
Thirty-three of them were reported to be wounded.
Eyewitnesses reported seeing bodies on the terrace of the Capuccino, which, like the Splendid, was frequented by Westerners and UN staff.
The French embassy said on its website earlier that a "terrorist attack" was underway and urged people to avoid the area.
French President François Hollande condemned the "odious and cowardly attack" in a statement.
With Ouagadougou airport closed because of the attack, an Air France flight from Paris to Ouagadougou was diverted to neighbouring Niger.
The Burkinabé army said a heavily armed group of about 20 people had carried out another attack on Friday near the border with Mali, killing two people, a police officer and a civilian, and leaving two others wounded.
Several attacks have taken place in Burkina Faso in recent months but no such assaults had hit the capital.
French special forces are stationed on the outskirts of Ouagadougou as part of the anti-jihadi operation in the Sahel.
The US has 75 soldiers in the country and said it was providing support to the operation.
The attack was claimed by Al-Qaida in the Islamic Maghreb (Aqim), attributing it to Al Mourabitoune, whose leader Mokhtar Belmokhtar has declared allegiance to Aqim.
A similar attack on the Radisson Blu in the Malian capital Bamako less than two months ago claimed 20 lives.