A RAID to free a French intelligence agent held captive in Somalia for three years has gone horribly wrong, leaving 17 Islamists and at least one French commando dead in a mud-caked farming town deep in militant territory.
In the chaotic aftermath of the firefight, the hostage's fate was unclear.
The Islamists denied French claims that he was killed and said they had a new prisoner – a wounded French soldier.
The botched rescue in East Africa struck a blow to French pride on the same day its air strikes in the West African nation of Mali targeted resurgent rebel Islamists.
The air strikes helped halt the "spectacular acceleration" of fighters linked to al-Qa'ida which officials said would have led to the fall of the country's capital at the weekend.
Jean-Yves Le Drian, the defence minister, said French and Malian forces had made progress towards stopping the rebel advance toward Bamako.
"If no one intervened, it would have fallen two or three days later," he said. "France is at war against terrorism."
The mission was part of a third day of strikes by France, which now has more than 550 air and ground troops in the West African country.
French officials said the operations in Somalia and Mali were unrelated, but stepped up domestic counter-terror measures to protect public places and transportation networks.
Confusion surrounded early reports of the failed rescue of the French agent, known by his code-name Denis Allex.
He was captured in Somalia on July 14, 2009 – Bastille Day – and last seen in a video released in October pleading for the French president to help him.
But the French raiders encountered serious problems from the moment the helicopters swooped in.
"This operation could not be achieved despite the sacrifice of two of our soldiers and doubtless the murder of our hostage," President Francois Hollande said in a grim broadcast.
"But this operation confirms the determination of France not to give into blackmail by terrorists."
French defence minister Jean-Yves Le Drian said Mr Allex was killed by his captors and that one French soldier was missing and one dead, along with 17 Islamists.
The defence ministry earlier said two commandos were killed in the fighting in Bulomarer, a farming community under Islamist control.
The militant Islamist group al Shabab said Mr Allex remained alive and in its custody, as was a new captive – a French commando wounded in fighting. There are also seven French hostages in Mali.
An al Shabab official said that fighting began after helicopters dropped off French soldiers.
"Five helicopters attacked a house in the town. They dropped soldiers off on the ground so that they could reach their destination," he said.
"We heard a series of explosions followed by gunfire just seconds after a helicopter flew over the town," a resident of Bulomarer, said by telephone.
"We don't know exactly what happened, but the place was an al-Shabab base."
An elder in the town, Hussein Yasin, said the French troops shot dead two residents who turned on flashlights after hearing movement.
As the soldiers walked away, they encountered an al-Shabab checkpoint and the gunfire began. As the Islamists retreated, the helicopters returned to retrieve the commandos, he said.
The al-Shabab official said some soldiers were killed, but the group held only one dead French soldier.
Later, the Islamist group released a statement saying that Mr Allex "remains safe and far from the location of the battle".
It said there would be a verdict in his case in two days.
The chief of staff of the French army, Edouard Guillaud, said France had exhausted any other way to free Mr Allex.