Lebanon’s parliament has elected Michel Aoun as president, ending a political stand-off that has left the post empty for more than two years.
The Maronite Christian former general secured 83 votes in the 128-seat chamber when MPs convened for their 46th attempt to choose a head of state.
Mr Aoun was backed by the powerful Shia Islamist group, Hezbollah.
His candidacy was blocked by the rival, Sunni-dominated Future Movement until a deal was struck earlier this month.
It will reportedly see the Future Movement’s leader, Saad Hariri, become prime minister.
The stalemate has paralysed Lebanon’s government, which is also struggling to deal with deep divisions over the five-year civil war in neighbouring Syria and the arrival of more than one million refugees.
Lebanon has been without a head of state since Michel Suleiman stepped down at the end of his term in May 2014.
The country’s complex power-sharing system stipulates that the president should always be a Maronite, the largest Christian denomination. The prime minister is meanwhile a Sunni Muslim and the speaker of parliament a Shia Muslim.
In the first round of voting on Monday, Mr Aoun failed to secure a two-thirds majority among the 127 MPs present.
A second round of voting – in which he required a simple majority to win – saw 128 ballots cast, which meant a third round was required.
The situation turned in the 81-year-old’s favour on 20 October when Mr Hariri said he would support his candidacy in order to “protect Lebanon, protect the [political] system, protect the state and protect the Lebanese people”.
Mr Aoun, who leads the Free Patriotic Movement, rose to prominence during Lebanon’s civil war as an anti-Syrian commander of the Christian-dominated Lebanese Army.
In 1988, then-President Amin Gemayel appointed him head of an interim military government, just before his own presidential term expired without a successor having been elected.
However, Muslim leaders refused to recognise Mr Aoun’s administration and backed the existing Sunni-led government.
Mr Aoun subsequently declared a “war of liberation” against Syrian forces in Lebanon.
Although a new president was elected in November 1989, Mr Aoun did not step aside until Syrian-led forces drove him out of the presidential palace and into exile in France in October 1990.
He returned to Lebanon only after Syrian troops withdrew in 2005 under international pressure following the assassination of former Prime Minister Rafik Hariri, Saad Hariri’s father.
Despite his life-long opposition to Syria’s influence, Mr Aoun formed a surprise political alliance with its staunch ally, Hezbollah, in 2006.
He also sided with Hezbollah in supporting Syrian President Bashar al-Assad, who is a member of the heterodox Shia Alawite sect, in his attempts to put down a Sunni-dominated rebellion.
The Saudi-backed Future Movement opposes Hezbollah’s intervention in Syria as well as the group’s military power inside Lebanon.
Lebanon: Michel Aoun elected president, ending two-year stalemate}