* French say captors kill hostage, rebels say he alive
* France says 17 Somalis, at least 1 French soldier killed
* Intelligence officer Denis Allex captured in July 2009
By John Irish and Abdi Sheikh
PARIS/MOGADISHU, Jan 12 (Reuters) - France sent special forces into Somalia to rescue a secret agent but insurgents apparently killed their hostage during the raid along with a commando, Defence Minister Jean-Yves Le Drian said on Saturday.
The intelligence agency team flew into southern Somalia by helicopter under cover of darkness to try to free Denis Allex, held since 2009, by al Qaeda-linked al Shabaab, on the same day France launched air strikes against Islamist militants in Mali.
"Commandos broke into where Allex was being detained last night and immediately faced strong resistance," Le Drian told a news conference.
"Intense combat took place, during which - and now I speak with caution - everything leads us to believe that Denis Allex was unfortunately killed by his captors."
Sowing confusion, Al Shabaab said in a statement that Allex was still alive.
Paris has been concerned that various French hostages held in Africa would be at risk if it intervened militarily against the al Qaeda-allied fighters in Mali, but Le Drian said the Somalia raid was "totally unconnected" to the Mali operation.
The deaths in Somalia coincided with the killing of a pilot in air strikes in Mali, however, striking a double blow to the start of a campaign that represents President Francois Hollande's biggest foreign policy test since his May election.
A French commando died from wounds sustained in the Somali raid and a second was missing, Le Drian said.
The defence ministry said earlier that 17 Somali fighters were killed in a mission prompted by "the intransigence of the terrorists, who refused to negotiate for three and half years".
Al Shabaab said in a statement that Allex was alive and being held at a location far from the base where French military helicopters attacked overnight.
"The injured French soldier is now in the custody of the mujahideen and Allex still remains safe and far from the location of the battle," it said. "Several French soldiers were killed in the battle and many more were injured before they fled from the scene of battle, leaving behind some military paraphernalia and even one of their comrades on the ground."
When asked about whether the missing commando was now in the hands of Al Shabaab, French Army chief Admiral Edouard Guillaud said: "If he is alive then he could be, but he could also be hiding."
France has eight nationals in Islamist hands in the Sahel area after a string of kidnappings, and has cited concern over their safety as a reason for its initial reluctance to spearhead any military action against the Islamist rebels in Mali.
A spokesman for Malian insurgents Ansar Dine said France's intervention in the country will put French citizens at risk.
"There are consequences, not only for French hostages, but also for all French citizens wherever they find themselves in the Muslim world," Sanda Ould Boumama told Reuters. "
A French military analyst, Jean-Dominique Merchet, said he doubted the raid had been mounted in coordination with the Mali operation and it appeared to be a case of unfortunate timing.
"The Mali intervention was not planned, it was launched in two days, whereas the other raid had been in the works for a week or two. There is no reason for them to have been coordinated," he said.
PLEADING FOR LIFE
Allex was one of two officers from the DGSE intelligence agency kidnapped by al Shabaab in Mogadishu in July 2009. His colleague, Marc Aubriere, escaped a month later but Allex had been held ever since in what Paris called "inhumane conditions".
The ministry said he was kidnapped while carrying out an aid mission with the Somali government. France has previously said the two men were in the Somali capital to train local forces.
A video of Allex pleading with Hollande to negotiate his release and save his life appeared on a website in October used by Islamist militant groups around the world. Reuters could not verify its authenticity.
Hollande said at the time the government was seeking to start talks with any party able to facilitate Allex's release.
After his abduction, al Shabaab issued a series of demands, which included an end to French support for the Somali government and the withdrawal of African Union peacekeepers, whose 17,600-strong troops are helping battle the rebels.
Under pressure from the peacekeeping troops and Somali government forces, al Shabaab has lost many of its major urban strongholds in south-central Somalia since it launched a rebellion against the Western-backed government in 2007.
The rebels, who want to impose their strict interpretation of sharia, or Islamic law, across the Horn of Africa state, withdrew from the capital Mogadishu in August last year and lost their last major bastion of Kismayu six weeks ago.
A Somali official in Bula Mareer, about 120 km (75 miles) south of Mogadishu, said French helicopters attacked overnight.
"Helicopters attacked al Shabaab at 2.00 a.m. this morning. Two civilians died in the crossfire," Ahmed Omar Mohamed, deputy chairman for lower Shabelle region, told Reuters.
An al Shabaab official who asked not to be named said they exchanged fire with French commandos. "Three helicopters dropped French commandos. We exchanged fire," the official told Reuters.