Burkina Faso security forces have begun assault to recapture the hotel and rescue hostages. Some hostages have been freed, media reported.
SITE Intelligence group, a US-based monitor group said on its website "Al-Qaida in the Islamic Maghreb (AQIM) claimed credit for the raid at the Splendid Hotel in Ouagadougou, the capital of Burkina Faso, reporting its execution by the recently-joined al-Murabitoon Battalion."
The Splendid Hotel often hosts Westerners, including UN staff and journalists, CNN reported.
Three heavily armed attackers, wearing ski masks, arrived in two vehicles, said witnesses at the hospital.
Foreigners and Burkina Faso nationals are being held hostages, said the Foreign ministry.
Earlier in the day, some 20 armed men attacked a security forces patrol in the vicinity of the northern city of Tinakof, near the Mali border, killing two people including a police officer and a civilian.