Soldiers inspect a passenger vehicle at a checkpoint on the southern Philippine island of Jolo, where pro-Islamic State Abu Sayyaf militants operate, July 16, 2017.

The Philippine armed forces killed 10 suspected Abu Sayyaf militants believed to be behind the abduction of two policewomen, but two soldiers also died in vicious fighting during the weekend on the southern Philippine island of Jolo, the military said Monday.

Soldiers of 5th Scout Ranger Battalion were ambushed by the Abu Sayyaf gunmen in a remote village in Patikul town Sunday, leading to the gun battle, military task force chief Brig. Gen. Cirilito Sobejana said.

Sobejana said 15 other Abu Sayyaf fighters were also believed wounded after the hourlong gun battle.

“Our actions were, however, very limited and calculated since we did not want to harm the kidnap victims,” Sobejana said.

The military recovered the bodies of only four militants, while the bodies of six others were retrieved by their comrades, Sobejana said, citing local intelligence reports. He did not elaborate.

Last week, the military also clashed with the Abu Sayyaf on Jolo, leaving 12 gunmen dead.

The fresh round of violence followed the April 29 abductions of policewomen Benierose Alvarez and Dina Gumahad on Jolo. Two men who were seized with them had been freed separately, although it was not clear if ransom had been paid.

The Abu Sayyaf, or Bearers of the Sword, is the most brutal of militant groups operating in the southern Philippines. It has been engaged mostly in banditry, kidnapping and bombings.

In February 2017, Abu Sayyaf members beheaded German yachtsman Jurgen Kantner after his government failed to pay ransom demanded by his abductors. Two Canadian hostages suffered the same fate the previous year.

To date, the group is still holding 12 hostages, including three Indonesians, one Vietnamese, one Dutch and seven Filipinos, the military said.

One of its leaders, Isnilon Hapilon, had pledged allegiance to the Islamic State and led a siege of the southern city of Marawi last year, leaving 1,200 people dead, most of them militants. The five-month siege ended in October with the death of Hapilon, although the government said dozens of militants had escaped.

Mark Navales in Marawi City contributed to this report.