JAKARTA, Indonesia — 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 by Abu Sayyaf militants 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.

In Manila, Philippine military officials said the release, which brought to 10 the number of kidnap victims freed by the Abu Sayyaf in the past two weeks, was due to ongoing operations against the group.

Filemon Tan, a military spokesman, said 12 more kidnap victims — two Indonesians, five Malaysians, four Filipinos and a Dutch — were still in the hands of the Abu Sayyaf.

Three Indonesian fishermen who were also being held by Abu Sayyaf militants were freed Sept. 17, 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 Indonesians 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.

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

Associated Press writer Jim Gomez in Manila, Philippines contributed to this report.