Troops in the Philippines have rescued a British national and his Filipina wife who were abducted by gunmen at a beach resort last month and taken to the jungle hideouts of local militants allied with Islamic State.

The regional military commander said troops had located the Abu Sayyaf captors of Allan and Wilma Hyrons in the mountainous hinterlands off Parang town, Sulu province, and rescued the couple safely after a gun fight.

“There was a running gun battle. They left the two behind because they could not drag them any more. They scampered in different directions but our troops are in pursuit,” Lt Gen Cirilito Sobejana said.

The Hyrons were not hurt in the 10-minute battle, the military said, and no ransom was paid to their captors.

A picture released by the military showed the couple talking to generals and other army officers in Sulu. Sobejana said the couple would undergo medical checkups and be interviewed by military officials.

Gunmen abducted the couple in October as villagers watched in shock from their beach resort in Zamboanga del Sur province, triggering a massive search. They owned a college in the town of Tukuran, where they have lived for years.

Military offensives against ransom-seeking militant groups such as Abu Sayyaf have reduced abductions in recent years but they continue to occur.

Sobejana said three Indonesian fishermen abducted recently off Malaysia’s Sabah state, on northern Borneo island near the sea border with the southern Philippines, were in the hands of Abu Sayyaf militants in Sulu.

Abu Sayyaf gunmen have staged kidnappings in and around Sabah in the past, prompting a regional security alarm.

The UK foreign secretary, Dominic Raab, said: “I am pleased to confirm that both Alan and Wilma Hyrons are safe and well and being looked after by the Philippine authorities … Foreign Office officials have been in close contact with Alan and Wilma’s family throughout this ordeal.”

The rescue of the Hyrons came after the military had inflicted successive battle defeats recently on Abu Sayyaf, which is blacklisted as a terrorist organisation by the US and the Philippines.

Troops killed a “high-value” but little-known Abu Sayyaf commander, Talha Jumsah, on Friday near Patikul in Sulu. Jumsah acted as a key Isis link to local jihadists and helped set up a series of suicide attacks in Sulu this year.

Five Abu Sayyaf militants, including two commanders, were killed by troops on Sunday in a separate clash in Sulu. One of those commanders, Sibih Pish, had been blamed for previous ransom kidnappings.

Abu Sayyaf emerged in the late 1980s as an offshoot of the decades-long Muslim separatist insurgency in the south of the largely Roman Catholic country.

After losing its commanders early in battle, Abu Sayyaf rapidly degenerated into a small but brutal group blamed for ransom kidnappings and beheadings. Most of its militant factions have pledged allegiance to Isis.