BEIRUT, Lebanon -- More than 2,100 people incarcerated by the Syrian authorities were being released on Wednesday in return for 48 Iranians freed by rebels after five months in captivity, Turkish and Iranian officials said, in what appeared to be the biggest prisoner swap since the uprising against President Bashar al-Assad of Syria began almost two years ago.
The timing of the exchange, brokered by Turkey and Qatar, was notable, suggesting that negotiations over at least some aspects of the Syrian crisis had not been abandoned three days after Mr. Assad warned that he would not negotiate with his armed adversaries and dismissed calls for him to quit.
Word of the exchange came as allies of Mr. Assad and of his opponents announced that they would continue talking, at least to one another. Lakhdar Brahimi, the special Syria envoy from the United Nations and the Arab League, will meet in Geneva on Friday with senior diplomats from Russia, which has opposed efforts to forcibly unseat Mr. Assad, and the United States, which like Turkey supports the armed opposition and wants Mr. Assad out.
While Mr. Assad's unbending stance seemed to make a political solution to Syria's civil war more remote, his only major foreign allies, Russia and Iran, have their eye on maintaining regional influence in a possible post-Assad future, and an interest in ending the Syrian war with state institutions intact. They have made clear they still favor a settlement. Backers of the opposition, too, worry about chaos in Syria and the region as the fight drags on, and the prisoner exchange suggested that Turkey and Iran, at least, wanted to maintain good relations even as they find themselves on opposite sides of the Syrian conflict.
The prisoner exchange came as Mr. Brahimi, a veteran Algerian diplomat, made his strongest suggestion yet that he would try to pressure Mr. Assad to step aside. Mr. Brahimi's comments, in an interview with the BBC, were his first since Mr. Assad, in a rare public address on Sunday, appeared to reject Mr. Brahimi's mediation efforts as foreign interference.
"In Syria, in particular, I think that what people are saying is that a family ruling for 40 years is a little bit too long," Mr. Brahimi said. "So the change has to be real. It has to be real, and I think that President Assad could take the lead in responding to the aspiration of his people rather than resisting it."
Russia and the United States both back Mr. Brahimi's efforts to broker a deal based on an international plan devised in Geneva in June, which envisions a transitional government, but does not spell out the fate of Mr. Assad. Talks have faltered in part because Mr. Assad's opponents demand his exit before talks, a precondition Russia rejects as a dangerous interventionist precedent.
Russia's Foreign Ministry said on Wednesday that mediators should pay attention to Mr. Assad's speech, saying he had embraced a political solution. Mr. Assad said he would negotiate only with those who have not "betrayed Syria," suggesting he wanted to pick and choose his interlocutors and would not talk to armed rebels.
There were other signs that opposing nations seek to bridge differences on Syria. Iran's foreign minister is scheduled to hold talks on Syria on Thursday with President Mohamed Morsi of Egypt, who has made Mr. Assad's removal his central foreign policy goal. A spokesman for Iran's Foreign Ministry said on Tuesday that even countries that disagree on Syria realize its crisis has no military solution, and should talk more to bring their views closer. And a Turkish deputy foreign minister arrived on Wednesday in Moscow for high-level talks on the crisis, Turkish media reported.
Some Middle East political experts speculated that the timing of the prisoner exchange -- and the lopsided ratio of roughly 44 people released by Syria for every freed Iranian hostage -- reflected both Mr. Assad's increasing dependence on Iran as well as Iran's increased pressure on him, possibly out of fear that Syria's instability may worsen.
"I'm wondering if this is the beginning of Iran starting to cut its losses, pulling out these folks, reducing its presence in the country," said Mona Yacoubian, a senior adviser on the Middle East at the Stimson Center, a Washington research group.
But some members of the Syrian opposition said the prisoner exchange merely showed that Mr. Assad showed more concern for Tehran than for his own soldiers, far more of whom are being held in captivity by rebels.
"If only we had half a million Iranians," Adeeb Shishakly, an exile opposition member said on Facebook, "we would have released them for the freedom of 23 million Syrians."
Word of the prisoner exchange dominated news on Wednesday in Iran, leading the Web site of the official Islamic Republic News Agency. Iran state television showed a brief clip of the released hostages at the Sheraton Hotel in Damascus, grinning, flashing victory signs and holding flowers.
Prime Minister Recep Tayyip Erdogan of Turkey said he hoped the exchange would lead to freedom for more prisoners in Syria -- and emphasized that "This process needs to be appreciated."
The exchange emerged from months of behind-the-scenes negotiations involving a Turkish charitable group, the Humanitarian Relief Foundation, widely known as I.H.H.
The group had set up an operation center in Damascus to unite 2,130 prisoners, including 73 women, at one base while another aid team remained in Douma, near the Syrian capital, to oversee the return of the 48 Iranians.
Precise details remained unclear. There were no pictures or lists released of the Syrian prisoners, or official confirmation from the Syrian government.
But Syrian fighters and activists reported that prisoners had been freed, including the "brides of freedom," Rima Dali and three others arrested in a Damascus market while wearing wedding dresses and carrying signs condemning bloodshed. The aid group said the prisoners included four Turks and a Palestinian, and its director, Bulent Yildirim, described prisoners at the Damascus exchange he coordinated.
"Captivity is a hard thing," he said. "I saw young women crying, many people lost a lot of weight, and there were also many sick people."
Rebels say the freed Iranians are members of Iran's Islamic Revolutionary Guards Corps, but the Iran government denies that, saying they are Shiite civilian pilgrims. The Iranians were seized in August while traveling to a Shiite shrine near Damascus. Opposition fighters had threatened to kill them unless Mr. Assad's forces stopped shooting.
The Turkish aid group gained international attention in 2010 for organizing a flotilla of boats heading to Gaza, ostensibly with relief supplies, that prompted a deadly Israeli commando raid in which eight Turks and an American of Turkish descent died. Recently, the organization has also negotiated to free smaller numbers of prisoners, including two Turkish journalists held in Syria, Reuters reported, and delivered aid to Syrians.
Some rebel commanders said more modest prisoner exchanges had become a feature of the conflict.
The leader of a rebel fighting group in the central city of Hama, reached via Skype, said pro-government militia members had captured his uncle and two other relatives in a village in the northern Idlib province last month.
"The only way to release them is capturing hostages," the commander said. He said talks were under way to release his relatives in return for 12 captives held by rebels. Two months ago, he added, nine members of a pro-government militia, known as shabiha, were exchanged for five captured rebels.
Anne Barnard reported from Beirut and Sebnem Arsu from Istanbul. Reporting was contributed by Hwaida Saad and Hania Mourtada from Beirut, Thomas Erdbrink from Tehran, Alan Cowell from London, and Rick Gladstone from New York.world
This article originally appeared in The New York Times.