Fourteen civilians and two soldiers were killed in the Ivory Coast beach resort of Grand Bassam on Sunday when gunmen stormed the popular weekend retreat and opened fire, President Alassane Ouattara said.
"Six attackers came onto the beach in Bassam this afternoon ... We have 14 civilians and two special forces soldiers who were unfortunately killed," Ouattara said during a visit to the site. The six attackers were also killed, he said.
The Reuters news agency later revised the death toll up to 16, including four Europeans.
Interior Minister Hamed Bakayoko said that "Security and defence forces intervened immediately and were able to neutralise six terrorists."
"The clean-up operation is under way," he said on state television.
The assailants, who were "heavily armed and wearing balaclavas, fired at guests at the L'Etoile du Sud [Southern Star], a large hotel which was full of expats in the current heatwave," a witness told AFP.
Hours after the attack, Al Qaeda in the Islamic Maghreb (AQIM) said it was behind the shooting in the former French colonial capital, around 40 kilometres (25 miles) east of the commercial hub Abidjan.
"In a message posted on its Telegram channels on March 13, 2016, the group reported that three `heroes' from its group were able to storm the resort," according to the SITE Intelligence Group, which monitors online communications by militant groups.
French President Francois Hollande on Sunday denounced the incident as a "cowardly attack."
"France will bring its logistical support and intelligence to Ivory Coast to find the attackers. It will pursue and intensify its cooperation with its partners in the fight against terrorism," Hollande said in a statement.
Attacks in recent months on luxury hotels in the capitals of neighbouring Mali and Burkina Faso have left dozens of people dead, leaving West African nations scrambling to boost security in the face of a growing threat.
Home to some 80,000 people, Grand-Bassam holds UNESCO World Heritage status thanks to its elegant colonial-era facades.