Ivory Coast has raised its security alert to the highest level and President Alassane Ouattara has pledged that the country would not be "intimidated by terrorists" following the attack on a beach town that killed 18 people.

Armed with grenades and assault rifles, the attackers stormed three hotels on Sunday and sprayed the beach with bullets in the resort of Grand Bassam, located 40km from the commercial capital Abidjan.

"The Ivory Coast will not allow itself to be intimidated by terrorists," Ouattara said in a statement broadcast on radio and television.

Deadly attack on resort in Ivory Coast

"Ivory Coast is standing up, standing up to fight the cowards and protect its people."

The attack was claimed by al-Qaeda's North Africa branch Islamic Maghreb (AQIM), which said that it was revenge for a French offensive against fighters in the Sahel region and called for its forces to withdraw.

Jean-Marc Ayrault, French foreign minister, and Bernard Cazeneuve, the interior minister, arrived in Ivory Coast on Tuesday to reassure the large French community and boost the investigation into the attack which left four French civilians dead.

Three Ivorian special forces personnel were killed and three of the attackers were also among the dead.

"We repeat our call to all countries involved in the French invasion of Mali to withdraw," said the AQIM statement.

Al Jazeera's Nicolas Haque, reporting from Grand Bassam, said that security forces were organising a re-enactment of the events that took place on Sunday.

"They are asking those eye witnesses for as much information as possible, trying to find clues as to what the security lapses were to try to ensure that an attack like this doesn't happen again." he said.

France launched Operation Serval to defeat fighters from northern Mali and replaced it in 2014 with Operation Barkhane which targets them across the Sahel region.

Source: Al Jazeera and agencies