MOGADISHU, Somalia -- 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.

Also on HuffPost:

Loading Slideshow...
  • This undated handout photo provided by the family of Robert Levinson, shows retired-FBI agent Robert Levinson. Levinson, 64, went missing on the Iranian island of Kish in March 2007. Levinson's family received these photographs of him in April 2011. U.S officials suspect the Iranians or its proxies are holding Levinson hostage. (AP Photo/Levinson Family)

  • This undated handout photo provided by the family of Robert Levinson, shows retired-FBI agent Robert Levinson. Levinson, 64, went missing on the Iranian island of Kish in March 2007. Levinson's family received these photographs of him in April 2011. U.S officials suspect the Iranians or its proxies are holding Levinson hostage. (AP Photo/Levinson Family)

  • This undated handout photo provided by the family of Robert Levinson, shows retired-FBI agent Robert Levinson. Levinson, 64, went missing on the Iranian island of Kish in March 2007. Levinson's family received these photographs of him in April 2011. U.S officials suspect the Iranians or its proxies are holding Levinson hostage. (AP Photo/Levinson Family)

  • This undated handout photo provided by the family of Robert Levinson, shows retired-FBI agent Robert Levinson. Levinson, 64, went missing on the Iranian island of Kish in March 2007. Levinson's family received these photographs of him in April 2011. U.S officials suspect the Iranians or its proxies are holding Levinson hostage. (AP Photo/Levinson Family)

  • This undated handout photo provided by the family of Robert Levinson, shows retired-FBI agent Robert Levinson. Levinson, 64, went missing on the Iranian island of Kish in March 2007. Levinson's family received these photographs of him in April 2011. U.S officials suspect the Iranians or its proxies are holding Levinson hostage. (AP Photo/Levinson Family)

  • This video frame grab from a Levinson family website shows retired FBI agent Robert Levinson. The family of Levinson, who vanished years ago in Iran, issued a plea to his kidnappers Friday and, for the first time, released a hostage video they received from his unidentified captors. (AP Photo/Levinson Family)

  • Daniel Levinson (L) shows a picture of his father, ex-FBI agent Robert Levinson, holding his grandson Ryan during a press conference with his mother Christine at the Swiss embassy in Tehran, 22 December 2007. The wife of the former agent missing in Iran since March said today she has received 'no answers' about his fate at the end of her trip to the Islamic republic in search of her husband, who Washington says went missing on a visit to the Iranian island of Kish. The Tehran government reiterated earlier it has no information that Levinson had disappeared on its territory. (BEHROUZ MEHRI/AFP/Getty Images)

  • An FBI poster showing a composite image of former FBI agent Robert Levinson, right, of how he would look like now after five years in captivity, and an image, left, taken from the video, released by his kidnappers, Tuesday, March 6, 2012, in Washington during a news conference. The FBI announced a reward of up to $1million for information leading directly to the safe location, recovery and return of Robert A. Levinson, a U.S. citizen and former FBI Special Agent who disappeared from Kish Island, Iran, five years ago. (AP Photo/Manuel Balce Ceneta)

  • An FBI poster showing a composite image of former FBI agent Robert Levinson, right, of how he would look like now after five years in captivity, and an image, center, taken from the video, released by his kidnappers, and a picture before he was kidnapped, left, displayed during a news conference in Washington, Tuesday, March 6, 2012. The FBI announced a reward of up to $1,000,000 for information leading directly to the safe location, recovery and return of Robert A. Levinson, a U.S. citizen and former FBI Special Agent who disappeared from Kish Island, Iran, five years ago on March 9, 2007. (AP Photo/Manuel Balce Ceneta)