Regional military spokesman Maj. Filemon Tan said the militants released Mohammad Nazer and Robin Peter to a rebel commander belonging to the Moro National Liberation Front near Sulu province's Indanan town amid pressure from military assaults.
The Moro rebel front is engaged in peace talks with the government and often acts as an intermediary for the release of Abu Sayyaf hostages. It was not immediately clear if a ransom was paid.
The two hostages were abducted from a tugboat off Sulu's Simisa island in June and taken to the Abu Sayyaf's jungle camps. After being freed, the captives were handed over to Sulu officials on Monday and then taken to a military trauma hospital for a checkup.
Government forces have been waging a monthslong offensive against the militants. Troops clashed with about 150 Abu Sayyaf gunmen on Saturday in fighting that the military said killed 10 militants and three soldiers.
Philippine President Rodrigo Duterte and his Malaysian and Indonesian counterparts have struggled to deal with a wave of attacks by the Abu Sayyaf and allied gunmen who target tugboats and cargo ships along their busy sea borders. The ransom kidnappings of Malaysian and Indonesian crewmen have continued despite heightened coastal and border security.
In Malaysia, security forces killed three Abu Sayyaf gunmen and captured two others during a failed kidnapping attempt in Malaysia's Sabah state near the southern Philippines on Thursday. Two other militants were missing after their speedboat was hit by gunfire and sank.
Among those killed was Abraham Hamid, an Abu Sayyaf militant who acted as a spotter in the kidnappings of two Canadians, a Norwegian and a Filipino woman in the southern Philippines last year, according to the Philippine military. The two Canadians were beheaded and the other two hostages were freed, reportedly in exchange for ransoms.
Abu Sayyaf militants are believed to be separately holding 18 foreign captives, including one each from Germany and South Korea and several Vietnamese crewmen of a cargo ship, along with five Filipino captives, the military said. - AP