Six shooters targeted hotels on a beach at Grand Bassam, a weekend retreat popular with westerners about 40 km (25 miles) east of the commercial capital Abidjan, before being killed in clashes with Ivorian security forces, the government said.
"Six attackers came onto the beach in Bassam this afternoon," Ivorian President Alassane Ouattara said during a visit to the site. "We have 14 civilians and two special forces soldiers who were unfortunately killed."
A French man was killed in the attack, according to a French foreign ministry spokesman. The nationalities of the other dead were not yet known, but four were European, one officer said during a briefing attended by a Reuters reporter.
Ivory Coast Interior Minister Hamed Bakayoko later said foreign citizens from France, Germany, Burkina Faso, Mali and Cameroon were among the victims.
The reporter saw the bodies of three white people at Grand Bassam's Chelsea Hotel and another in the Hotel Etoile du Sud next door.
Employees load a body into a van after heavily-armed gunmen opened fire in the Ivory Coast resort town of Grand-Bassam Source: Getty Images
A short drive from Abidjan - one of West Africa's largest cities with around 5 million inhabitants - Grand Bassam fills up on weekends with thousands of beachgoers.
Witnesses said the gunmen followed a pathway onto the beach where they then opened fire on swimmers and sunbathers before turning their attention to the packed seafront hotels where people were eating and drinking at lunchtime.
"They started shooting and everyone just started running. There were women and children running and hiding," said another witness, Marie Bassole. "It started on the beach. Whoever they saw, they shot at."
Security forces moved to evacuate the area surrounding the beach. Bullet holes riddled vehicles nearby and glass from shattered windows littered the ground.
The body of one of the attackers, dressed in dark trousers and a blood-covered striped shirt, lay beside the beachside entrance to one hotel, a bullet hole in his head.
Beside him on the sand sat a combat vest used to carry extra ammunition. Nearby, on the ground, lay unexploded grenades.
Al Qaeda in the Islamic Maghreb (AQIM), which has carried out other recent attacks in the region, claimed responsibility for Sunday's shootings, according to the U.S.-based SITE intelligence monitoring group, citing an AQIM statement.
It said the attack had been carried out by just three militants.
Barely two months ago, Islamists killed dozens of people in a hotel and cafe frequented by foreigners in neighboring Burkina Faso's capital, Ouagadougou. Gunmen also attacked a hotel in the Malian capital, Bamako, late last year.
Both of those attacks were also claimed by AQIM and raised concern that militants were extending their reach far beyond their traditional zones of operation in the Sahara and the arid Sahel region.
Though previously untouched by Islamist violence, Ivory Coast, French-speaking West Africa's largest economy and the world's top cocoa producer, has long been considered a target for militants.
It has been on high alert since the Ouagadougou attacks, and security has been visibly bolstered at potential targets, including shopping malls and high-end hotels.
By Sunday evening, Ivorian authorities had begun an investigation into the attacks.
"We have a mobile phone that is now in the hands of the Ivorian scientific police that will allow us to look at all the ramifications and go back to the source," Interior Minister Bakayoko said on state-owned television.
As the scale of the tragedy become evident, regional and world leaders expressed their support for Ivory Coast, which has recently emerged from a decade of political turmoil and civil war to become one of the world's fastest growing economies.
President Macky Sall of Senegal, another country seen as a likely target for AQIM, called upon West African countries to step up their cooperation against terrorism and violent extremism.
France's President Francois Hollande, meanwhile, denounced the shootings in the former French colony 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," he said in a statement.