Two kidnapped Turkish pilots arrived in Istanbul after leaving Lebanon on Saturday and nine Lebanese hostages freed from Syria landed in Beirut, completing a hostage exchange after months of uncertainty.
Prime Minister Tayyip Erdogan greeted the Turkish Airlines pilots on the tarmac as they disembarked from a Qatar Airways jet and were met with cheers from family members.
The Lebanese, seized by Syrian rebels in May 2012, were freed and left northern Syria for Turkey a day earlier as part of the deal negotiated by Qatari mediators.
At Beirut International Airport, friends and relatives ululated and cheered as the men walked onto the tarmac.
"The situation is worse than you can imagine, we paid a heavy price," said one of the hostages, who was walking with a cane, apparently from an injury sustained in captivity.
The hostages' release may in fact be a three-way deal, Lebanese security sources said. They said the release of the Lebanese was originally contingent on the Syrian government's freeing of prisoners in state detention centers.
An opposition monitoring group, the Syrian Observatory for Human Rights, said the government had released dozens of prisoners over the past few days as part of that agreement.
Turkish Foreign Minister Ahmet Davutoglu said the release underscored Turkey's diplomatic clout.
"The success of this process, which has been conducted under the instructions of our prime minister, proves once again the regional importance of Turkey," Davutoglu said in a Twitter post before the pilots landed in Istanbul.
The kidnappings highlight how complex and regionalized Syria's 2-1/2-year conflict has become. The civil war has acquired sectarian dimensions that have pulled in its neighbors.
Sunni Muslim countries such as Turkey largely back the Sunni-led uprising against President Bashar al-Assad's rule.
Shi'ite Iran backs Assad, as does the Lebanese militant group Hezbollah, which is Shi'ite and supported by Tehran. Assad is from the Alawite sect, an offshoot of Shi'ite Islam.
'We didn't see daylight'
Security sources said the agreement required that the Lebanese hostages not leave Turkey until the Turkish ambassador in Beirut had seen the Turkish pilots, who had been kidnapped in retaliation for the snatching of the Lebanese.
One of the Turkish hostages said their captors treated them respectfully and did not use violence against them.
"We weren't treated badly, but the first 25 days were difficult. We didn't see daylight," Murat Agca told reporters.
The Lebanese hostages' families say they were religious pilgrims, but their kidnappers accused them of belonging to Hezbollah, which has been fighting alongside Assad's forces in Syria.
The Turkish pilots were kidnapped by the family of one of the Lebanese hostages in order to press the Turkish government to help secure the group's release. Turkey has some influence with the Syrian opposition, having offered refuge and support to the rebels fighting Assad.
Abbas al-Shuaab, one of the freed Lebanese hostages, wrapped a Hezbollah flag from the crowd around his shoulders.
"They accused me of being in Hezbollah and I was not in Hezbollah," he said. "But from now on, I consider myself a soldier and fighter for [Hezbollah leader] Hassan Nasrallah."