A U.N. peacekeeper works at the Quneitra Crossing between Syria and the Israeli-controlled Golan Heights. Syrian rebels freed 21 U.N. peacekeepers on Saturday after holding them hostage for three days. (Dan Balilty/AP)

Twenty-one U.N. peacekeepers being held by Syrian rebels for three days were set free Saturday before safely crossing the border into Jordan, according to senior U.N. officials and rebel commanders

The development marked the end of one of the most dramatic U.N. hostage crises in years, and it followed days of intense U.N. negotiations to secure the release of the Filipino blue helmets against a backdrop of intensive fighting between Syrian forces and rebel fighters.

“The armed group that had detained the 21 peacekeepers transported them to the Jordanian border, where they were met by Jordanian officials,” said Josephine Guerrero, a spokeswoman for the U.N. Department of Peacekeeping. “All 21 peacekeepers are well and unharmed.”

After the peacekeepers arrived safely in Jordan, U.N. Secretary General Ban Ki-moon’s office issued a statement welcoming the peacekeepers’ release and urging the combatants to respect the U.N. peacekeepers’ freedom of movement and the safety of the U.N. personnel in Syria, where they are monitoring a decades-old truce along the Golan Heights between Israel and Syria.

“The secretary general welcomes the release of the 21 U.N. Disengagement Observer Force (UNDOF) peacekeepers who had been detained on March 6,” the statement by Ban’s press office said. He “emphasizes to all parties the impartiality of the United Nations.”

Ban also urged the warring parties to “respect and uphold the protection of civilians,” reflecting persistent concerns that Syrian authorities may retaliate against villagers in the town of Jamlah, where rebel forces were holding the peacekeepers in a series of home basements.

On Friday, the United Nations’ top peacekeeping official, Herve Ladsous, had expressed concern about the fate of the village, citing evidence that Syrian forces had been shelling the town. Syria’s U.N. envoy, Bashar al-Jaafari, denied his government was shelling the town.

Negotiations for the release of the peacekeepers took place between rebels from the Free Syrian Army and the United Nations and did not involve the Syrian government or military, according to rebel fighters.

Clashes erupted between the Syrian military and rebels as the freed peacekeepers were on their way to the Jordanian border, rebel fighters said.

“There was heavy fighting between the Free Syrian Army and regime forces to secure safe passage for the observers,” said Fahed Masri, a spokesman for the FSA.

The capture of the peacekeepers was a clear sign that the volatile Syrian conflict can easily drag in noncombatants or even spill across borders. Mortars have landed on Israeli territory from the area in recent months, and Israeli soldiers have fired warning shots across the border.

There had been heavy fighting between the Syrian military and rebel forces in and around Jamlah for days before the capture of the U.N. group, and some rebel fighters accused the peacekeepers of passing on information about their movements to Syrian military commanders.

“We have proof that these observers were carrying regime soldiers in their U.N. cars, and they allowed them to take photos of FSA positions in the area,” Masri said. “The observers were not kidnapped by the Free Syrian Army. They were hosted by the Free Syrian Army to send a message to the U.N. that it should do its job as a disengagement force and not be part of the conflict.”

A U.N. official, who spoke on the condition of anonymity, said that U.N. peacekeepers had provided life-saving medical care to injured Syrian troops in the area but that they have done the same for wounded rebels.

U.N. officials said the peacekeepers were on a regular supply mission when they were captured. The peacekeepers “were doing their daily run before they were stopped and abducted, which is unacceptable,” the Syrian Arab News Agency quoted Mokhtar Lamani, the head of U.N. envoy Lakhdar Brahimi’s office in Syria, as saying.

In a video posted online Wednesday, a rebel fighter from the Martyrs of Yarmouk Brigade, the group responsible for the captivity of the U.N. soldiers, said the peacekeepers would be treated as “war prisoners” and would not be released until the Syrian military withdraws from the area.

However, rebel fighters in subsequent videos posted online disavowed the initial statement and said the group had been detained for their own safety and were being treated as guests.

Dehghanpisheh reported from Beirut. Suzan Haidamous contributed to this report.