* Philippines speaks of seven-hour firefight with 100 rebels
* U.N. says ceasefire was agreed with "armed elements"
* Israel and Syria help get troops back to base, U.N. says (Adds all Philippine peacekeepers moved to safe place, details from U.N. statement, officials, in paragraphs 1-10, 14)
By Louis Charbonneau and Avi Ohayon
UNITED NATIONS/EIN ZIVAN, Golan Heights, Aug 30 (Reuters) - A ll the Philippine U.N. 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 U.N. 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."
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.
Late on Saturday, U.N. 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 U.N. 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 U.N. 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 U.N. armoured vehicles returning to their base in Israeli-controlled territory about 12 hours after the peacekeepers came under fire at around 6 a.m. (0300 GMT).
"All 32 Filipino personnel from this position have been extricated and are now safe," the U.N. press office said in a statement issued in New York. "The U.N. peacekeepers returned fire and prevented the attackers from entering the position."
Separately, 44 UNDOF peacekeepers from Fiji were detained by militants 8 km (5 miles) away from the Philippine troops on Thursday and remain missing.
A senior U.N. 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.
REBELS SAY FIJIANS IN GOOD HEALTH
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 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 U.N. 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 U.N. force in Liberia, which is struggling with an outbreak of the deadly Ebola virus.
Blue-helmeted U.N. 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 is a strategic plateau captured by Israel in the 1967 Middle East War, and Syria and Israel technically remain at war. UNDOF monitors the area of separation, a narrow strip of land running about 70 km (45 miles) 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.
Asked how Israel intends to meet the new challenge in the Golan area, Prime Minister Benjamin Netanyahu said in an interview recorded on Friday and aired on Saturday that Israel was prepared to face the threats.
"We have already taken steps. We did not wait, we built and renovated the security fence. Al Nusra has been present there for about the past five months. We are prepared for various possibilities," he told Channel 10 television.
"We live in a tough Middle East, in a tough area, and compared with other countries, we are taking care of our security and economy better than everyone. But we face challenges on a number of fronts," Netanyahu said. (Additional reporting by Mariam Karouny in Beirut, Jeffrey Heller in Jerusalem and Rosemarie Francisco and Manuel Mogato in Manila; Writing by Ori Lewis; Editing by Andrew Roche and Mohammad Zargham)