DAMASCUS, Syria (AP) -- Rebels freed 48 Iranians on Wednesday in exchange for more than 2,000 prisoners, including women and children, held by Syrian authorities -- a deal struck after rare negotiations involving regional powers Turkey, Qatar and Iran.
It was the first major prisoner swap since the uprising began against President Bashar Assad nearly 22 months ago.
Iran is one of Assad's main allies, and the Iranians, who were seized outside Damascus in August, were a major bargaining chip for factions trying to bring down his regime in the civil war that has killed more than 60,000 people.
The exchange also highlighted the plight of tens of thousands of detainees languishing in Syrian prisons, many of whom were picked up at street protests and have not been heard of since.
The group of 48 Iranians arrived Wednesday at the Sheraton hotel in several vans escorted by Syrian security forces. Looking disheveled but healthy, they were greeted by Iran's ambassador in Damascus, Mohammad Riza Shibani, and several Iranian clerics who distributed a white flower to each of the men, some of whom broke down in tears.
"The conditions placed (by the captives) were difficult, but with much work ... we succeeded in securing this release," Shibani told reporters. "I hope such tragedies will not be repeated."
He said their release was a result of elaborate and "tough" negotiations, but did not elaborate. The Syrian government, which rarely gives details on security-related matters, had no official comment and it was not clear what prompted the exchange.
Rebels claimed the captives were linked to Iran's powerful Revolutionary Guard, but Tehran has denied that, saying the men were pilgrims visiting Shiite religious sites in Syria.
But U.S. State Department spokeswoman Victoria Nuland described most of the Iranians as "members of the Iranian Revolutionary Guard," calling it "just another example of how Iran continues to provide guidance, expertise, personnel, technical capabilities to the Syrian regime."
The rebels had threatened to kill the captives unless the Assad regime halted military operations against the opposition.
It was not clear what prompted the government to negotiate the exchange, but opposition leaders said the Assad regime felt obligated to please its Iranian backers.
"The Iranian hostages had become an embarrassment to the regime," said Bassam al-Dada, a Turkey-based coordinator with the rebel Free Syrian Army. "Iran was pushing for a solution and Assad could not afford to cross his Iranian master," he said.
Kamer Kasim, an analyst at the Ankara-based International Strategic Research Organization, linked Assad's agreement to the swap to Damascus' desire not to be seen as the intransigent party, after it rejected U.N. envoy Lakhdar Brahimi's peace deal. He said Iran has long been pressing for the release, and Syria was eager to maintain good relations with Tehran.
"The Iranian government supports the Syrian regime of Bashar Assad, and its possible refusal of the exchange deal might have harmed this relationship," Kasim said.
A spokesman for a Turkish Islamic aid group that helped coordinate the release said the regime had agreed to release 2,130 people in exchange for the Iranians.
As of Wednesday evening, it was not clear how many of those had been freed.
Turkish Prime Minister Recep Tayyip Erdogan praised the swap, but expressed regret that many remain locked up by the Syrian government.
"Let's hope that they may be released as well and let's hope that the process is beneficial for all," Erdogan said during a visit to Niger.
He said the deal was brokered with the help of a Turkish and a Qatari aid organization, and added that Turkey had been talking with the rebels during the negotiations. Four Turks and "a number of Palestinians" were among the prisoners released by the Syrian government, he said.
Speaking in Istanbul, Umit Sonmez of the Foundation for Human Rights and Freedoms and Humanitarian Relief which coordinated the negotiations, said the 48 Iranians were handed over to aid workers soon after the Syrian regime let a group go.
Sonmez said the Syrian prisoners included "ordinary people or friends or relatives of the rebels."
"This is the largest prisoner exchange to date," Sonmez said. "We are pleased that people from all sides who were held and victimized have finally been freed."
"Turkey and Qatar, who have influence over the rebels, spoke with the rebels. They also spoke with Iran. Iran for its part spoke with Syria."
Turkey's state-run agency Anadolu Agency also said a group of people, including women and children, held in the Syrian Interior Ministry building in Damascus had been released and were escorted onto buses. The report could not be confirmed because of government restrictions on journalists in Syria.
Bulent Yildirim, the head of the Turkish aid organization, told Anadolu in Damascus that 1,000 people have been released so far, including 74 women and a number of children between the ages of 13 and 15.
Some photographs released from the aid organization showed a group of women lined up against a wall, apparently waiting to be released. Most seemed to be hiding their faces from the camera. Another showed a group of men, their heads shaven, standing in a room.
Regime forces and rebels have exchanged prisoners before, most arranged by mediators in the suburbs of Damascus and in northern Syria, but the numbers ranged from two to 20 prisoners. The Syrian Red Crescent also has arranged exchanges of bodies from both sides.
Nadim Houry, deputy Middle East director for the New York-based Human Rights Watch, said "tens of thousands" of Syrian activists, opposition supporters and members of their families remain jailed in Syria since the uprising began in March 2011.
Many of those in government custody have had no contact with the outside world for months and no access to a lawyer. Most are being held by the state security services around the country, Houry said.
"For every person released, thousands remain detained and thousands more cannot be accounted for," he Told the Associated Press.
The rebels are also known to be holding a group of nine Lebanese Shiites, at least two Iranian engineers and scores of pro-regime supporters and captured soldiers.
Russia's Foreign Ministry said senior Russian and U.S. diplomats will discuss the Syrian crisis in talks later this week with Brahimi.
In a speech Sunday, a defiant Assad ignored international demands to step down and said he is ready to talk -- but only with those "who have not betrayed Syria."
He outlined his vision for a peace initiative that would keep him in power to oversee a national reconciliation conference, elections and a new government. But he also vowed to continue to fight terrorists -- a term the government uses for the rebels.
The opposition rejected his offer, which also drew harsh international criticism.
Russian officials said Assad's proposals should be taken into consideration.
Syria's Information Minister Omran al-Zoubi said countries such as the United States and its Western allies have dismissed the president's initiative "before even having the time to translate it."
Fraser reported from Ankara, Turkey. Associated Press writers Ali Akbar Dareini in Tehran, Matthew Lee in Washington and Barbara Surk and Zeina Karam in Beirut contributed to this story.