A second French commando has died from wounds suffered during a failed attempt to rescue a French agent in Somalia held hostage since 2009.

Al Shabaab said the French commando had died in their custody and posted photos of what it said was his body on the internet, according to the SITE monitoring service.

The insurgent group also said it had made a decision on the fate of hostage Denis Allex and that a message conveying its verdict would be forthcoming.

France said it believes Mr Allex was killed during the rescue operation.

The militants put up fierce resistance when French special forces went into southern Somalia by helicopter under the cover of darkness on Saturday to try to free Mr Allex.

There was some confusion over the exact outcome of the mission, with the French government saying at one point that one commando had died and the other gone missing, and later saying that both appeared to be dead.

"The second commando died from his bullet wounds. We shall display the bodies of the two Frenchmen," Sheikh Abdiasis Abu Musab, spokesman for al Shabaab's military operations, told Reuters by telephone.

Defence Minister Jean-Yves Le Drian told reporters it seemed that both commandos were killed in the raid and France was braced for some kind of gory video message by al Shabaab.

"Everything leads us to think that the hostage was assassinated and the other disappeared soldier has been killed," he said.

A ministry source said earlier the government believed both commandos were dead, but it did not have the bodies.

The militants later released photos on the internet of the body of a white man with a black shirt and military trousers amid bulletproof jackets, several assault rifles and gun clips. A necklace bearing a cross is also visible.

Mr Allex was one of two officers from France's DGSE foreign intelligence service kidnapped by al Shabaab three-and-a-half years ago in the capital Mogadishu.

A colleague, Marc Aubriere, escaped a month later but Mr Allex had been held ever since in what Paris called "inhumane conditions".

A video of a gaunt-looking Mr Allex pleading with Mr Hollande to negotiate his release and save his life appeared on a website in October used by Islamist militant groups around the world.