BEIRUT Where the Arab League, the United Nations, France and many other go-betweens had failed, the tiny Gulf state of Qatar succeeded in cajoling Lebanese leaders into a political agreement to avert the risk of a new civil war.
This week's Doha deal was the biggest achievement so far in a bid by Qatari ruler Sheikh Hamad bin Khalifa al-Thani to prove his country can punch above its weight in regional diplomacy.
"Qatar is insignificant in reality, but the Qataris are emerging as leading mediators in the Middle East," said Mustafa Alani, a security analyst at Dubai's Gulf Research Centre.
Among wealthy Qatar's mediation assets is its ability to stay on good terms with almost everyone from the United States to Iran -- and now even its old Gulf rival Saudi Arabia.
"They invest a lot of time and money and they have no public opinion at home to satisfy," Alani said of a country that is home to fewer than a million people, most of them foreign workers.
Qatar disavows direct control of Al Jazeera, but the way diverse groups are allowed to express their views on the satellite channel -- from dissidents, rebels and Islamists to U.S. officials and even Israelis -- creates an impression that the state will also be even-handed when it comes to mediation, he argued.
The Qataris adopted a pragmatic, no-nonsense approach to the task of extracting an accord from their feuding Lebanese guests, unencumbered by ideological Arab baggage, delegates said.
Prime Minister and Foreign Minister Sheikh Hamad bin Jassim bin Jabr al-Thani worked the phones to Riyadh, Tehran, Damascus and Washington during the six days of talks, they said.
"He was very direct, fair and transparent," said one delegate closely involved in the negotiations.
Qatari mediators have sought to defuse conflicts in Yemen, Somalia, Darfur and among Palestinians, with varying success.
A deal they brokered last year to calm a revolt by Zaydi tribesmen in Yemen has since faltered. Their drive to reconcile Palestinian factions contributed to the Saudi-sponsored Mecca accord between Fatah and Hamas last year, which later collapsed.
But the Lebanon deal, achieved in a setting comparable with the Saudi-brokered Taif accord that ended the country's 1975-90 civil war, eclipses these other Qatari efforts.
"The regional and international significance of the Lebanon issue and its wider ramifications made this very important," said Neil Partrick, a Dubai-based Middle East analyst.
Lebanon's divisions are complicated by a broader conflict pitting the United States and Saudi Arabia against Iran and Syria, which all push their own influence via local factions.
Qatar, as a small country that threatens no one, can offer itself as an honest broker, widely perceived as neutral.
The Qatari prime minister never left the Doha hotel where the talks took place, not even accompanying the emir to Saudi Arabia for a meeting of the Gulf Cooperation Council (GCC).
"Sometimes he was tough and flared up at one side or other, but quickly calmed down and came up with new ideas. It was clear he wanted a fair and honourable deal. Unlike previous mediators he kept equal distance from both sides," the delegate said.
Constantly engaged with rival delegates, he often stayed up until 3 or 4 in the morning. On occasion he would appear in the hotel lobby in white robe and headdress to chat with a Lebanese leader, sometimes wagging a finger, sometimes all smiles.
Apart from such negotiating skills, the Qataris could also capitalise on a thaw in their ties with Saudi Arabia, which until last year had often voiced irritation with Al Jazeera television coverage of the kingdom and viewed Qatar as a gadfly.
But reconciliation efforts were crowned in December when Saudi King Abdullah attended a GCC summit in Qatar, along with a special guest -- Iranian President Mahmoud Ahmedinejad.
"In the past, if you accepted Qatari mediation you would automatically anger the Saudis," Alani said. "Saudi acceptance of Qatar's role is a major shift and a great bonus for Qatar."
The challenge for Qatar and other Arab mediators at the Doha talks will be to ensure that the Lebanese parties do not sabotage the agreement by reneging on their commitments.
"Countries like Qatar and Saudi Arabia can oversee agreements when the will for them exists," Partrick said. "What they don't have is the capacity, or even the inclination, to follow them up and engage in the active diplomacy that can keep them in play -- which was one problem of the Mecca agreement."
However, the Qataris have shown tenacity in trying to refloat the peace agreement they brokered in Yemen's sputtering conflict with tribal rebels in the northern Saada region.
And they will surely join an Arab League team due to attend a dialogue that Lebanon's new president is to convene to discuss strengthening state authority and the state's relationship with "other organisations" -- a reference to Hezbollah.
(Additional reporting by Nadim Ladki in Doha; editing by Sami Aboudi)