MOGADISHU: One of two French security agents kidnapped by insurgents in Somalia last month escaped on Wednesday and fled to the presidential palace in Mogadishu.

Police said the former hostage killed three of his captors but Marc Aubriere denied killing anyone and said he slipped away while his guards were sleeping.

Militants had seized the Frenchmen at a hotel in the capital on July 14 and handed one to the Hizbul Islam rebels and the other to fighters from the Al-Shabab group, which Washington describes as Al-Qaeda’s proxy in the Horn of Africa state.

Al-Shabab militants said they had later taken custody of both men, although that could not be confirmed. Somali government officials at the city’s hilltop Villa Somalia palace said the man who escaped was in good health.

“We understand he killed three Al-Shabab guys who were guarding him. I cannot understand how this good story happened but now he is in the hands of the government,” Abdiqadir Odweyne, a senior police commander, told Reuters.

Somalia’s fragile UN-backed government faces a stubborn insurgency mounted by Al-Shabab and others. They have been joined by foreign militants who Western security agencies say are using the country as a safe haven to plot attacks in the region and beyond.

An Al-Shabab source confirmed three of its members were killed, but said it was not known by whom, “Three of my friends died but who killed them is the question. We were expecting a ransom this morning,” the rebel source said.

One associate of the kidnappers said the Frenchman had been freed after talks with Somali elders, and a senior Somali government source said a ransom had been paid for his release.