Thousands of well-wishers greeted the Shiite pilgrims in Beirut, with one man being carried out of the airport on the shoulders of a crowd. Meanwhile, a plane carrying the two freed Turkish Airlines pilots landed in Istanbul, where Prime Minister Recep Tayyip Erdogan and other officials greeted them.
Their planes departed just minutes apart, crisscrossing in the skies as part of the carefully-calibrated plan. The hostage release ends an ordeal that began a year and a half ago when Syrian rebels kidnapped the pilgrims, triggering tit-for-tat kidnappings that included the two Turkish pilots.
The deal, negotiated by Qatar and Palestinian officials, also was meant to include freeing dozens of women held in Syrian government jails to satisfy the rebels who abducted the pilgrims. However, it wasn't immediately clear Saturday night whether any of the women had been freed. The Syrian government and its official SANA news agency did not mention any such release.
The nine Shiite pilgrims were kidnapped in May 2012 while on their way from Iran to Lebanon via Turkey and Syria. Turkish Airlines pilots Murat Akpinar and Murat Agca had been held since their kidnapping in August in Beirut.
Their abductions show how the chaos from the Syrian civil war, now in its third year, has spilled across the greater Middle East.
"For the first 15 days, we were kept in a room and didn't see the light of day," Akpinar said in a hastily organized news conference after landing in Istanbul. He said he and his colleague were guarded by dozens of gunmen. "It was impossible for us to escape," he said.
In Beirut's international airport, hundreds of relatives shouted and screamed as the pilgrims filed in.
"My son, my son!" one woman sobbed.
Dozens of green-clad Lebanese soldiers tried to keep order as crowds heaved forward.
One pilgrim accused his kidnappers of not offering the hostages medical care.
"We wished that any of them had any kind of values," said the pilgrim, who did not give his name in the chaos. "We were with people who couldn't tell a female camel from a male camel," he said, referring to an Arabic proverb to describe an ignorant person.
Other pilgrims said they were kept in dark, humid rooms for most of their confinement. They could hear heavy fighting nearby.
Lebanese government officials and clerics greeted the men, kissing their cheeks one by one. A top Lebanese official who coordinated the pilgrims' release entered the airport to the backdrop of whooping cheers and loud music.
"It was difficult, without a doubt," said Maj. Gen. Abbas Ibrahim, head of Lebanon's general security apparatus. "I didn't want anything from this deal, except to see this sight," he said, gesturing at the waiting crowds.
The Lebanese pilgrims gained their freedom first, crossing into Turkey late Friday. The Turkish pilots were released Saturday.
The pilgrims were held by Syrian rebels who initially demanded that the Lebanese Shiite group Hezbollah end its involvement in the Syria's civil war. They later softened their demands, instead asking for the release of imprisoned women held by security forces loyal to Assad.
Assad has drawn support from Syria's ethnic and religious minorities, including Christians and members of his Alawite sect. The rebels are dominated by Syria's Sunni Muslim majority. Hezbollah has played a critical role in recent battlefield victories for forces loyal to Assad. Hard-line Sunni fighters have backed the rebels.
The Syrian civil war, which has killed at least 100,000 people, has sent millions of refugees pouring into neighboring nations. It also has divided the Middle East. The conservative Sunni monarchy Saudi Arabia supports rebels. Syria's neighbors, majority-Sunni Jordan and Turkey, also have supported some rebel groups. Shiite-majority Iran supports Syria.
Lebanon is divided into a patchwork of sects, including Sunnis, Shiites and Christians. Lebanese Sunnis mostly support their Syrian brethren; Lebanese Shiites have staked their future with the Syrian regime.
The kidnapping of the Shiite Lebanese pilgrims unleashed a wave of kidnappings by Shiite clansmen inside Lebanon, including the two Turkish pilots. The gunmen hoped to pressure Turkey to help release the pilgrims.
Lebanese, Turkish and Syrian officials declined to immediately offer more details of the multilateral exchange. But the deal appeared to be mostly mediated by the resource-rich Gulf state of Qatar, which has supported Syrian rebels in their battle against Assad. The Turkish hostages arrived home on a Qatar Executive private jet, though Qatari officials did not speak there or in Lebanon.
The hostage deal is one of the more ambitious negotiated settlements to come out of Syria's civil war, where the warring sides remain largely opposed to any bartered peace. But it suggested that the parties—and their regional backers—were more prepared to deal with each other than at any other previous time in the conflict.
Meanwhile, the Syrian civil war went on. Rebels assaulted a checkpoint in a pro-government suburb of Damascus on Saturday, setting off a suicide car bomb that killed 16 soldiers, activists said.
Rebels led by the al-Qaida-linked Jabhat al-Nusra or Nusra Front set off the bomb while assaulting a checkpoint near the town of Mleiha. The town lies beside the suburb of Jaramana, the Britain-based Syrian Observatory for Human Rights said. It reported heavy fighting after the blast.
The state news agency SANA said the suicide blast wounded 15 people, most of them seriously.
Associated Press writers Suzan Fraser in Ankara, Turkey, and Jon Gambrell in Cairo contributed to this report.