MANILA, Philippines — A leading militant suspect who has been linked to beheadings of hostages, including two Canadians and a Malaysian, in the southern Philippines has surrendered after being wounded in battle, officials said Friday.

A commander of the Muslim rebel group Abu Sayyaf, Abduljihad Susukan, gave himself up Thursday after negotiations with police in southern Davao city. He was served warrants for at least 23 cases of murder, six for attempted murder and five for kidnapping, national police chief Gen. Archie Gamboa said.

He is the highest-ranking commander of the small but brutal group to be taken into custody this year.

The military has been battling for years the Abu Sayyaf, which has been blacklisted by the United States and the Philippines as a terrorist organization over a series of bombings, ransom kidnappings and beheadings. Many of its estimated 300 remaining gunmen, mostly poor villagers, have aligned themselves with the Islamic State group.

Security officials blame Susukan and his followers for taking part in cross-border kidnappings of tourists and others from the Malaysian state of Sabah on Borneo island. They included a Malaysian who was beheaded by the militants in 2015 in their jungle base in southern Sulu province on the day when Malaysia’s then-Prime Minister Najib Razak arrived in Manila to attend a regional summit.

Susukan also helped finance the kidnappings of two Canadian men who were separately beheaded in Sulu in 2016 after the militants failed to get a huge ransom. Another Abu Sayyaf militant, Ben Yadah, killed the Canadians and remains at large, a military officer said.

Susukan surrendered to a Muslim rebel chief after an accidental explosion of his M203 rifle grenade in a gunbattle with troops in Sulu severed his left arm. Military officials had believed he was killed but later learned he was in the custody of Nur Misuari, who leads an armed group which signed a 1996 peace deal with the government.

Misuari flew from Sulu to Davao city on a private plane with Susukan on Sunday, sparking speculation he may be planning to present the suspect to President Rodrigo Duterte.

Duterte has been staying in his hometown in Davao, where Misuari also has a home. Although the president has appointed Misuari as a special envoy to the Organization of Islamic Cooperation, the Muslim rebel chief has not been clearly authorized to hold talks with suspected terrorists.

“His giving himself up to Mr. Misuari is not the surrender contemplated under the law and does not make him immune from arrest,” military spokesman Maj. Gen. Edgard Arevalo said in a statement.

Under a murky arrangement, Misuari and his rebel force have been allowed to keep their weapons in Sulu and outlying provinces under the 1996 Muslim autonomy deal in the south, homeland of minority Muslims in the largely Catholic nation. They have been occasionally accused by security officials of attacking the military and providing aid and sanctuary to the Abu Sayyaf.