A French commando raid to free an intelligence agent held captive for three years ended in the deaths of the hostage and a French soldier, the French military said.
But the man's Islamist kidnappers said the hostage was alive and that a French soldier had been captured as well.
Confusion surrounded early reports of the botched rescue of the agent, known by his code-name Denis Allex. The intelligence agent was captured on July 14 2009 and last seen in a video released in October pleading for the French president to help him.
But it was clear that a dangerous raid that the French defence minister said was planned with the utmost of care had gone horribly wrong.
The militant Islamist group al-Shabab, which had held Mr Allex for more than three years, said today that he remained alive and in their custody, along with a new captive - a French commando wounded in the failed rescue.
French defence minister Jean-Yves Le Drian said one French soldier was missing and one was dead, along with 17 Islamists killed in the fighting. The Defence Ministry earlier said two commandos were killed.
"It was an extremely dangerous mission," Mr Le Drian said.
A Somali intelligence official had earlier said the raid caused casualties but that he had no information on the hostage.
Mr Le Drian said the operation in Somalia was unrelated to the French offensive overnight in Mali to drive back Islamist militants.
Residents of the Somali town of Bulomarer described the chaotic sounds of explosions and gunfire from what they called an al-Shabab base. An al-Shabab official said that fighting began after helicopters dropped off French soldiers.