The Abu Sayyaf group released Stefan Okonek and Henrike Dielen on southern Jolo Island, Defence Secretary Voltaire Gazmin said.
Abu Sayyaf spokesman Abu Rami told radio station DXRZ in southern Zamboanga City that his group received 250 million pesos (USD 5.6 million) in ransom. He did not say who paid it. Gazmin said he was "not privy" to information about any ransom payment.
Abu Sayyaf gunmen seized Okonek and Dielen last April from a yacht between Malaysia's Sabah state on Borneo Island and the western Philippine province of Palawan. They were taken by boat to Sulu province, about 950 kilometers (590 miles) south of Manila, where militants are holding other hostages.
Abu Rami had threatened to behead Okonek today if there was no ransom payment. The group also demanded the withdrawal of German support for US-led air strikes against the Islamic State group in Syria and Iraq.
Also Read
"The 250 million pesos arrived, no more, no less," he said.
In an interview with DXRZ allowed by the militants earlier this week, Okonek, 71, who identified himself as a medical doctor, pleaded, "please do everything to get us out of here."
He said he was speaking from inside a 5 meter-by-3 meter (15 foot-by-10 foot) "grave" the gunmen had dug for him in the jungle. He said he and Dielen had been separated by the militants about a day earlier.
Military chief of staff Gen. Gregorio Catapang said the freed hostages were taken to a hospital in a military camp and would be flown to Manila tomorrow.
He said the military and police would conduct an "all-out offensive" against the Abu Sayyaf and "look for the other kidnap victims."
Catapang said the Abu Sayyaf is still holding more than a dozen other hostages, including Filipinos and two European birdwatchers who were kidnapped two years ago.