FRANCE sent commandos into Somalia to rescue a secret agent who had been held by insurgents since 2009, but said yesterday it believed he had been killed by his captors along with a French soldier during the raid.

The intelligence agency's team flew into southern Somalia by helicopter under cover of darkness in the early hours of yesterday to try to free Denis Allex from the al-Qaeda-linked al Shabaab, on the same day France launched air strikes against Islamist militants in Mali.

Defence Minister Jean-Yves Le Drian said the operations were not connected, but France has been concerned that other hostages held in Africa would be at risk if they intervened against the al-Qaeda-allied fighters on the other side of the continent. Eight French nationals are in Islamist hands in the Sahara after a string of kidnappings.

The twin operations represent President François Hollande's biggest foreign policy tests since being elected last May.

"Commandos broke into where Allex was being detained last night," Le Drian said. "Intense combat took place, during which – and now I speak with caution – everything leads us to believe that Denis Allex was killed by his captors."

But al Shabaab said in a statement that he was still alive and being held at a location far from the base where French military helicopters attacked overnight.

It added: "Several French soldiers were killed in the battle and many more were injured before they fled - leaving behind some military paraphernalia and even one of their comrades on the ground."

Le Drian said one French soldier died in the operation and a second was missing. The Defence Ministry earlier said 17 Somali fighters were killed in the fighting, which was prompted by "the intransigence of the terrorists, who refused to negotiate for three-and-a-half years".

Allex was one of two French intelligence officers kidnapped by al Shabaab in Mogadishu in July 2009. His colleague, Marc Aubriere, escaped a month later. Allex had been held ever since in what France called "inhumane conditions".

Meanwhile, West African states prepared to send troops to Mali as French aircraft bombed Islamist fighters there as part of an international campaign to crush rebels who have seized control of the north of the country.

The West African regional bloc Ecowas has for months lobbied world powers to back its plan to end the nine-month occupation of Mali's north by Islamist groups including Ansar Dine, MUJWA and AQIM, al-Qaeda's North African affiliate.

In a letter to the UN Security Council, France's US ambassador, Gerard Araud, emphasised that French military operations in support of the Malian army "will last as long as necessary".

In response, Sanda Ould Boumama of the Islamist insurgent group Ansar Dine said: "There are consequences, not only for French hostages, but also for all French citizens wherever they find themselves in the Muslim world."