The hostages were seized Feb. 8 from a seaweed farm in Malaysia’s Sabah state and whisked away in a speedboat to nearby Philippine waters in a pattern similar to past kidnappings-for-ransom blamed on the notorious terrorist group Abu Sayyaf.

Police commandos, who have been searching for the captives, recovered the two men near Bongao town in the southernmost island province of Tawi-Tawi late Tuesday, national police chief Raul Bacalzo told reporters. He said the gunmen abandoned the hostages after they were encircled by government forces.

The kidnappers escaped and the Malaysians, Chen Yui Chung, 48, and Lai Wong Chun, 46, were flown to Manila. They will be turned over to the Malaysian Embassy after being debriefed by Philippine authorities and checked up in a hospital at police headquarters in the capital.

Wearing baseball caps, the two appeared to have lost weight as they walked into a hospital emergency room from an ambulance. One wore combat boots. 

Interior Secretary Jessie Robredo said the two told him they were not harmed by their captors and were fed well.

The kidnappers had demanded ransom but Robredo said he was unaware of any payment.

Malaysian and Philippine authorities were initially unsure if the hostages were still in Malaysia or the southern Philippines, where the Abu Sayyaf and other rebel groups have carried out kidnappings for ransom.

The Abu Sayyaf has gained notoriety for high-profile kidnappings, beheadings and bomb attacks. Battle setbacks, arrests and surrenders have reduced the group’s strength to more than 300 from more than 1,000 guerrillas during its heyday in 2000, the military says.

Hundreds of US troops have been providing weapons, training and intelligence to Philippine forces in the south for years to help eradicate the Abu Sayyaf, which is on Washington’s list of terrorist organizations.