Mali has declared a 10-day state of emergency following the attack on Radisson Blu Hotel by suspected Islamist militants in the capital, Bamako, in which gunmen killed 19 people.
President Ibrahim Boubacar Keita has also declared three days of mourning.
Announcing the death toll, Ibrahim Boubacar Keita said two militants had also been killed.
Al-Qaeda in the Islamic Maghreb and its affiliate, al-Murabitoun, said they carried out the attack.
More than 130 hotel guests and staff were freed when Malian Special Forces, French Special Forces and off-duty US servicemen stormed the Radisson Blu hotel on November 20 to break the siege.
Among those killed were three Chinese business executives, and China’s President Xi Jinping has called the attack “cruel and savage”, Reuters news agency reports.
An American was also killed, and President Barack Obama said the attack was yet another reminder that the “scourge of terrorism” threatened many nations.
President Ibrahim Boubacar Keita said Mali would “do everything to eradicate terrorism” in the country.
Earlier reports said at least 27 people had died.
A UN official, who spoke on condition of anonymity, said 12 bodies were found in the basement and 15 on the second floor.
It is not clear how many gunmen too part. Eyewitnesses said up to 13 entered the hotel shooting and shouting “God is greatest!” in Arabic – however the company that runs the hotel, Rezidor Group, said on November 20 that only two attackers were involved.
There is as yet no established link with the attacks in Paris one week ago that killed 130 people last week.