Updated

Somalia's most dangerous militant group said Thursday that it killed a French hostage that French military forces tried to rescue last weekend during a botched raid.

Al-Shabab said in a Twitter posting that the agent, Denis Allex, was killed Wednesday evening Somalia time.

French officials have said they believe Allex was killed the night of the raid and that claims by al-Shabab of an execution were simply propaganda. Allex, a French intelligence agent, was taken by the militants in July 2009 and had been held ever since.

A French raid Friday night and early Saturday failed to rescue him and resulted in the deaths of two French troops and 17 Somalis, French officials say.

The Islamist extremists said in an Internet posting on Wednesday that they had decided to kill Allex in retaliation for the weekend operation. The group has offered no proof that Allex was alive any time after the raid.

Adm. Edouard Guillaud, France's military chief of staff, said Wednesday that there had been no indication since the night of the raid that Allex was still alive, and that French official believed he was already dead.

Transported by helicopters, the French commandos attacked the al-Shabab position early Saturday in an attempt to free Allex. France's defense minister has said the government decided to stage the rescue a month ago, when Allex's location seemed to have settled down "in a spot accessible by the sea." U.S. military aircraft briefly entered Somali airspace to support the rescue operation, President Barack Obama said Sunday, but did not use weapons.

French officials said they killed 17 of the Islamist rebels. Al-Shabab said many villagers were killed.

Al-Shabab once controlled all of south-central Somali, including the capital, Mogadishu. African Union troops pushed al-Shabab out of the capital in 2011, but the Islamist rebels still control wide swaths of rural southern Somalia.