Beirut: Lebanon's parliament on Monday elected former general Michel Aoun president, ending a vacuum and political stalemate of more than two years.
After four rounds of voting, including two unexpected repeat votes, Aoun won support from 83 lawmakers, easily clearing the 50-per cent-plus-one majority required.
The final tally included 36 blank votes and eight void ballots.
Aoun, 81, failed to achieve the two-thirds majority necessary to win a first round of voting, and a second round was repeated twice after the number of votes exceeded the 127 MPs present in the session.
But the former army chief's victory had been all but assured after two longstanding political rivals offered him their support.
Aoun's election ends a vacancy for the post since May 2014, when his predecessor Michel Sleiman's mandate ended.
The country's deeply divided political powers were repeatedly unable to reach consensus on a candidate for president, a post reserved in Lebanon for a Maronite Christian and elected by parliament.
The breakthrough came with the shock support of two of Aoun's greatest rivals: Samir Geagea, leader of the Christian Lebanese Forces, and Sunni former premier Saad Hariri.
Hariri, who Aoun is expected to name prime minister, said his endorsement was necessary to "protect Lebanon, protect the (political) system, protect the state and protect the Lebanese people".
Aoun has long eyed the presidency, and his candidacy has been backed from the beginning by the powerful Shiite Hezbollah movement, his ally since a surprise rapprochement in 2006.
But the powerful parliament speaker Nabih Berri and his bloc opposed Aoun's nomination, and made no secret of their displeasure.
"Your election should be a beginning, not an end," Berri said, after Aoun's victory was declared.
"This parliament is ready to extend its hand to lift up Lebanon. Long live the president, long live Lebanon." As his supporters cheered in the streets, wearing the trademark orange of his Free Patriotic Movement party, Aoun took the oath of office in front of lawmakers.
"I swear to God the great, that I will respect the constitution and its laws, and preserve the independence of the Lebanese nation and peace on its lands," he said.