“Three civilians were also killed in the gunfight,” he said.
Allex was kidnapped in Somalia on July 14, 2009 — Bastille Day — along with a colleague. A second hostage, named as Marc Aubriere, was free a month later, in what the French government said was an escape.
Al-Shabaab lost its main strongholds in the south and center of Somalia following an offensive launched in mid-2011 by an African Union force, but it still controls some rural areas.
Allex appeared in a video in June 2010 appealing to Paris to drop its support for the Somalian government.
He last appeared in another video in October last year looking gaunt and calling on Hollande to work for his release.
Somalia has not had an effective central government since 1991.
France has a recent history of botched operations, including a failed joint raid with Niger forces in 2011 that left both hostages dead and another in Mali that led to the hostage’s execution.
In 2009, French commandos launched a raid to free a French family whose yacht had been hijacked by Somalian pirates. They retook the boat, but accidentally shot the father.