Bosaso - Somalia's government said late on Sunday that it had killed Abdullahi Nadir, one of the co-founders of Islamist militant group al Shabaab, in an operation with international partners.

Somali security forces have touted gains made in recent weeks against the al Qaeda-linked group while fighting alongside local self-defence groups. But al Shabaab has continued to conduct deadly raids, including two last Friday that killed at least 16 people.

Somalia's information ministry said in a statement that the operation that killed Nadir happened on Saturday. It said he was al Shabaab's chief prosecutor and was in line to replace the group's leader, Ahmed Diriye, who is sick.

"His death is a thorn removed from the Somali nation," the ministry's statement said. "The government is grateful to the Somali people and international friends whose cooperation facilitated the killing of this leader who was an enemy of the Somali nation."

Al Shabaab insurgents have killed tens of thousands of people in bombings since 2006 in their fight to overthrow Somalia's Western-backed central government and implement its interpretation of Islamic law.

Somalia's President Hassan Sheikh Mohamud, elected by lawmakers in May, has promised to take the fight to the insurgents after three years in which his predecessor, consumed by political infighting, took little action against al Shabaab.

Somalia's military is supported by U.S. troops and drones and an African Union peacekeeping mission. It was not immediately clear which international partners participated in the operation that killed Nadir.

(Reporting by Abdiqani Hassan Writing by Alexander Winning Editing by Aaron Ross, Kirsten Donovan)