All the Philippine UN peacekeepers trapped by Islamist militants on the Syrian side of the Golan Heights have been moved to a secure place, the United Nations and the Philippines said.

The United Nations said the 40 peacekeepers left during a ceasefire agreed with "armed elements" in the area shortly after midnight local time and were moved to a safe place.

In Manila, General Gregorio Catapang, the Philippines' armed forces chief, told a news conference that Israel and Syria helped in what was the "greatest escape" of Filipino troops after engaging about 100 Islamist militants surrounding them in a seven-hour firefight.

The troops escaped in the middle of the night while the rebels were sleeping, he said.

"This attack prompted UNDOF to reposition our troops to a more secure position within the mission area," Catapang said, referring to the UN peacekeeping force that has monitored the disengagement zone between Israel and Syria since 1974, following the 1973 Arab-Israeli war.

"Currently, Filipino peacekeepers from both position 68 and 69 have been successfully repositioned to Camp Ziuoani."

No peacekeepers wounded

On Saturday, 32 peacekeepers were rescued from Islamists who fired at their post and trapped them for two days, the United Nations said.

Catapang said Irish UNDOF troops helped in the rescue. It was not known if any rebels were killed or wounded in the operation.

A member of the UN Disengagement Observer Force (UNDOF) keeps watch of the Syrian side of the Quneitra crossing from an observation post in the Golan Heights. (Ronen Zvulun/Reuters) Late on Saturday, UN diplomatic sources said militants had reinforced their siege of the 40 peacekeepers trapped at position 68.

Colonel Roberto Ancan, head of the Philippine military's peacekeeping operations centre, said Syrian government forces fired artillery at the rebels, weakening their positions surrounding the peacekeepers. None of the peacekeepers were wounded, he said.

The UN press office said in a statement that "shortly after midnight local time on 31 August, during a ceasefire agreed with the armed elements, all the 40 Filipino peacekeepers from UN position 68 left the position. The 40 peacekeepers arrived in a safe location one hour later."

Another UN statement issued in New York on Saturday said UNDOF had evacuated two observation posts after one of them came under fire and moved 11 staff to a safe location.

Earlier on Saturday, a Reuters cameraman spotted 11 UN armoured vehicles returning to their base in Israeli-controlled territory about 12 hours after the peacekeepers came under fire at around 6 a.m.

"All 32 Filipino personnel from this position have been extricated and are now safe," the UN press office said in a statement issued in New York. "The UN peacekeepers returned fire and prevented the attackers from entering the position."

Separately, 44 UNDOF peacekeepers from Fiji were detained by militants eight kilometres away from the Philippine troops on Thursday and remain missing.

A senior UN official told Reuters that it appears at least one rebel was killed in fighting during the course of Thursday and Friday, though the details and exact timing remained unclear.

Fijians in good health, rebels say

A commander with the Islamist Nusra Front, a group linked to al-Qaeda, told Reuters the Fijian peacekeepers had been detained because UNDOF was aiding the government of Syrian President Bashar al-Assad and had ignored the suffering of the Syrian people.

UNDOF has been deployed "since 1974 to ensure the safety and protection of the borders with (Israel), the usurper of the lands of the Muslims, at the same time it completely ignored the daily shedding of the Muslims' blood on the other side of the border," part of a Nusra Twitter message said.

It added that the men were being treated well and were in good health.

A UN official said a number of UNDOF contingents participated in the rescue on Saturday, assisted by Israeli and Syrian forces.

UNDOF has 1,223 peacekeepers in the zone from six countries: Fiji, India, Ireland, Nepal, the Netherlands and the Philippines.

The United Nations said this week the Philippines had decided to pull out of UNDOF and from a UN force in Liberia, which is struggling with an outbreak of the deadly Ebola virus.

Blue-helmeted UN troops were seized on the Golan Heights by militants in March and May 2013. In both cases they were released safely.

Austria, Japan and Croatia have all pulled their troops out of UNDOF due to the deteriorating security situation and spillover from the Syrian war.

The Golan Heights is a strategic plateau captured by Israel in the 1967 Arab-Israeli war, and Syria and Israel technically remain at war. UNDOF monitors the area of separation, a narrow strip of land running about 70 kilometres from Mount Hermon on the Lebanese border to the Yarmouk River frontier with Jordan.

Rebels of the Nusra Front have been battling the Syrian army in the area and have wrested control of the border crossing at Quneitra, which is operated by the United Nations.