Updated

Three Indonesian hostages have been released in the southern Philippines after being held by their Abu Sayyaf captors for more than three months, Indonesia's foreign minister said Sunday.

The men, who were freed just before midnight Saturday, were undergoing health exams in the southern Philippine province of Sulu, Foreign Minister Retno Marsudi said at a news conference. She said they would be transferred to the city of Zamboanga before being handed over to Indonesian officials and flown back to Indonesia.

The three -- Ferry Arifin, Muhammad Mabrur Dahri and Edy Suryono -- were among seven crew members of a tugboat who were kidnapped in June. Two of the others were released previously, and two are still being held.

It was not immediately clear whether the three released late Saturday had been ransomed off.

Three Indonesian fishermen who were also being held by Abu Sayyaf militants were freed two weeks ago along with a Norwegian man and two Filipinos.

Marsudi said the government is working for the release of the two remaining Indonesian hostages -- the tugboat's navigator, Robin Piter, and third engineer, Muhammad Nasir.

The seven were abducted June 20 in southern Philippine waters while returning from Cagayan De Oro port in the Philippines to Samarinda, the capital of East Kalimantan province on Borneo island.

The Abu Sayyaf has been blacklisted as a terrorist organization by the United States and the Philippines for deadly bombings, kidnappings and beheadings.

Philippine forces launched a major offensive against the Abu Sayyaf after the beheadings of two Canadians early this year sparked condemnations from then-Philippine President Benigno Aquino III and Canadian Prime Minister Justin Trudeau.

The Canadian leader has called on other nations not to pay ransoms to discourage the militants from carrying out more kidnappings.