Two French soldiers died and 17 "terrorists" were killed in a failed bid to free a French hostage in southern Somalia from Islamists holding him since 2009, the French defence minister said Saturday.
The overnight operation was launched by France's elite DGSE secret service, Defence Minister Jean-Yves Le Drian said in a statement, adding that the raid was sparked by the "intransigence of the terrorists who have refused to negotiate for three and a half years and were holding Denis Allex in inhuman conditions."
But the Shebab extremists denied Le Drian's assertion that they had killed the hostage, a secret agent whose alias is Denis Allex, adding that they would decide his fate in two days and issuing a stern warning to Paris.
Two French soldiers "lost their lives (and) 17 terrorists were killed" in the battle, Le Drian said, offering the "most sincere condolences" to the dead soldiers' families and praising the men for their "courage and remarkable work".
He said the families of the dead soldiers had been informed.
A Shebab statement said "in the end, it will be the French citizens who will inevitably taste the bitter consequences of their government's devil-may-care attitude towards hostages."
Sheikh Mohamed Abdallah, a local Shebab military commander, told AFP: "Mujahedeen fighters defeated the so-called commandos of the French government who tried to rescue a hostage, and they (the commandos) left the bodies of several of their own at the site of the attack."
Abdallah is the commander of Bulomarer, where the raid allegedly took place.
The Shebab statement said the French carried away "several" of their dead.
"The helicopters attacked a house ... upon the assumption that Denis Allex was being held at that location, but owing to a fatal intelligence blunder, the rescue mission turned disastrously wrong.
"Several French soldiers were killed in the battle and many more were injured before they fled from the scene of battle, leaving behind some military paraphernalia and even one of their comrades on the ground.
"The injured French soldier is now in the custody of the mujahedeen and Allex still remains safe and far from the location of the battle."
A Bulomarer resident, Idris Youssouf, told AFP: "We don't know exactly what happened because the attack took place at night, but this morning we saw several corpses including that of a white man.
"Three civilians were also killed in the gunfight," he said.
The French secret agent was kidnapped in Somalia in July 2009 along with a colleague who was freed the following month.
Four military helicopters were used in the raid in Shebab-controlled Bulomarer, some 110 kilometres (70 miles) south of the Somali capital Mogadishu, witnesses said.
The Al-Qaeda linked Shebab lost their main strongholds in the south and centre of the country following an offensive launched in mid-2011 by an African Union force, but they still control some rural areas.
Allex is among nine French hostages in Africa of whom at least six are held by Al-Qaeda in the Islamic Maghreb (AQIM).
He appeared in a video in June 2010 appealing to Paris to drop its support for the Somali government.
He last appeared in another video in October looking gaunt and calling on French President Francois Hollande to work for his release.
Somalia has not had an effective central government since 1991. However, a new administration took office last year, ending eight years of transitional rule by a corruption-riddled government.
Over a million Somalis are displaced inside the country while over a million are refugees in neighbouring nations, according to UN figures.
The United Nations this month appealed for $1.3 billion to support 3.8 million people -- about half the population of the war-torn country -- it said are in need.
In 2011, famine in the country caused by extreme drought exacerbated by conflict claimed tens of thousands of lives and affected more than four million people, according to the United Nations.