Lebanese lawmakers ended a two-year political vacuum Monday by electing as president ex-army chief Michel Aoun, who promised to protect the country from spillover from the war in neighbouring Syria.
The deeply divided parliament took four rounds of voting to elect 81-year-old Aoun, whose supporters flooded streets across the country waving his party's orange flag.
"Lebanon is still treading through a minefield, but it has been spared the fires burning across the region," Aoun said after taking the presidential oath.
"It remains a priority to prevent any sparks from reaching Lebanon," the Maronite Christian leader said.
Michel Aoun (photo by: Joyce Hanna/AFP)
Syria's five-year war has been a major fault line for Lebanon's political class, and analysts have warned Aoun's election will not be a "magic wand" to end divisions.
The next challenge will be forming a government and that is expected to take months of wrangling.
Presidential media office chief Rafik Chlala said consultations to name a prime minister would begin Wednesday morning, with an announcement expected at noon Thursday.
It remains unclear if Lebanon's perpetually ineffectual political class can solve key problems, including a trash crisis that has seen rubbish pile up in open dumps.
The parliament that elected Aoun has twice extended its own mandate, avoiding elections because of disagreements over a new electoral law.
Aoun had long eyed the presidency, and his candidacy was staunchly backed by Iran-backed Shiite movement Hezbol lah, his ally since a surprise rapprochement in 2006.
'Dream come true'
The key to Michel Aoun clinching the post was the shock support of two of his key rivals: Christian Lebanese Forces leader Samir Geagea and Sunni former premier Saad Hariri (photo by: Anwar Amro/AFP)
But the key to clinching the post was the shock support of two of his key rivals: Christian Lebanese Forces leader Samir Geagea and Sunni former premier Saad Hariri.
Hariri, expected to be appointed premier, said his endorsement was necessary to "protect Lebanon, protect the (political) system, protect the state and protect the Lebanese people".
Hariri and Geagea both oppose Syria's President Bashar al-Assad, while Hezbollah supports Damascus and has dispatched fighters to bolster its forces.
That feud left MPs repeatedly unable to reach consensus on the presidency, a post reserved for a Maronite Christian.
After taking the oath, Aoun rode in a convoy of black cars to the presidential palace in Baabda, east of Beirut, where his wife and three daughters were waiting to congratulate him.
In Beirut's majority-Christian neighbourhood of Ashrafiyeh, revellers lit fireworks and fired volleys of celebratory gunfire.
The atmosphere in Jdeideh outside Beirut was one of untrammelled joy, with thousands honking car horns and popping bottles of champagne.
"I'm so happy. After 25 years our dream has come true," said 33-year-old accountant Giselle Tammam.
Assad congratulated Aoun on being elected, hoping it would contribute to "reinforcing stability" in Lebanon, Syria's state news agency SANA said.
Syria's Al-Watan daily, which is close to the government, said the election represents "the triumph of the resistance, of Syria and its allies". 3
Lebanese take to the streets of the coastal city of Batroun to celebrate the election of former general Michel Aoun as president, on October 31, 2016 (photo by: alhoub/AFP)
President Francois Hollande spoke of France's "determination" to continue supporting Lebanon "to preserve its integrity and security," his office said.
Franjieh 'respects result'
The United States called for the rapid formation of a government in Beirut.
UN Secretary General Ban Ki-moon and EU diplomatic chief Federica Mogherini both saw in the election a step towards Lebanese politicians closing ranks in the national interest.
Iran "congratulated" the Lebanese people, calling the election "an important step to entrench democracy and ensure Lebanon's stability".
President Hassan Rouhani called Aoun to congratulate him, Iran's official IRNA news agency said.
In addition to pledges of economic growth and security, Aoun said Lebanon must work to ensure Syrian refugees "can return quickly" home.
More than a million Syrian refugees have flooded Lebanon, which is already home to hundreds of thousands of Palestinians, many in squalid camps.
Lebanon's 127 lawmakers took nearly two hours to elect Aoun, who failed to secure a two-thirds majority in the first round.
A second round was repeated twice, after 128 ballots -- exceeding the number of MPs -- were cast.
At times the session threatened to descend into farce, with votes cast for pop star Myriam Klink and "Zorba the Greek".
MPs, including from speaker Nabih Berri's bloc, cast blank ballots in protest at the horsetrading that secured Aoun's candidacy.
"A blank ballot is an objection to the way things were done," MP Ali Khreis said.
Aoun secured 83 votes, far more than the 50-percent-plus-one majority needed for a second-round victory.
Christian politician Sleiman Franjieh -- Assad's childhood friend and Berri's favoured candidate -- said he "respected the result".
"We'll see what i s proposed to us for the government," he tweeted, hinting at a potential ministerial post as a consolation prize.