Lebanon's former prime minister, Saad al-Hariri, on Thursday backed Michel Aoun, his former political foe and an ally of Hezbollah, to become the country’s president in a move which could help resolve the country's political deadlock.

"I announce today before you my decision to endorse the candidacy of General Michel Aoun for the presidency of the republic," Hariri said in a televised speech.

"This decision comes from the need to protect Lebanon and the state and the people ... but it is a decision that depends on agreement," Hariri said.

Political sources within Lebanon have speculated that Hariri could become prime minister again under the plan, although it has drawn opposition from members of his own party, according to Reuters.

The presidency, which is reserved for a Maronite Christian in the country's sectarian power-sharing arrangement, has been vacant for two and a half years due to political conflicts.

According to a 1943 pact, the prime minister must be a Sunni Muslim and the speaker of parliament a Shia Muslim.

Aoun, a veteran politician in his 80s, has long coveted the post of president, which is essentially a figurehead position because any decisions must be approved by both the parliament and prime minister.

It was not immediately clear if Aoun's candidacy would enjoy enough backing among other politicians to secure a quorum of parliament members, two-thirds of the 128-seat legislative body.

The next scheduled parliamentary session to elect a president is set for 31 October. The parliament has had 32 failed attempts at appointing a president since the end of Michel Suleiman's term in May 2014.

Aoun is a former army chief who held the post of an interim prime minister in 1989 towards the end of the Lebanese civil war. His cabinet was contested by the government of then-Syrian-backed prime minister Selim Hoss. With the support of Iraq's Saddam Hussein, he declared war against Syrian troops in the country, but his forces were defeated and he was forced into exile in France.

He returned to Lebanon in 2005 and forged an unlikely alliance with Hezbollah.

Opponents of Aoun's candidacy this time around include Parliament Speaker Nabih Berri, head of the Shia Amal Movement and a close ally of Hezbollah, which is backing the former general.

Berri warned that accepting Aoun for the position could lead to a “civil war” - a potent phrase for a country which suffered 15 years of bloody internecine strife between 1975 and 1990 which claimed an estimated 250,000 lives. He warned of “severe consequences that threaten coexistence".

Hariri, 46, has led the "March 14" alliance against Hezbollah and its allies since the 2005 assassination of his father and then prime minister Rafik al-Hariri.

He remains a fierce critic of Hezbollah, which is fighting in Syria in support of President Bashar al-Assad.

He led the mostly Sunni Future Movement (FM) party to election victory in 2009 and served as prime minister. But in January 2011 his government was overcome by a Hezbollah-led alliance that quit his cabinet and forced him to resign. Since then, he has spent most of his time abroad.

The latest proposal, unthinkable until recently, casts new light on the predicament facing Hariri, whose standing as Lebanon's most influential Sunni politician has been shaken by a financial crisis at his Saudi-based construction business.

Saudi Oger has been hit hard by falling oil prices and cuts in Saudi state spending, laying off more than 1,300 workers late last month after it lost the government contract to run the world’s largest Quran-printing press.

The troubles have led to a cash crunch for the Future Movement and speculation that financial woes have forced Hariri to recalibrate his relationship with Hezbollah.

Diplomats also say Hariri has fallen from favour within Saudi Arabia, which these days cares far more about confronting Iranian influence in the Gulf and Syria than about Lebanon.

Observers suggest that Riyadh cut off funding for Hariri last year amid a perceived failure to halt Hezbollah leader Hassan Nasrallah’s vitriolic public tirades against Saudi Arabia.

Hariri’s intention to back Aoun, a known ally of Hezbollah, could be a further symptom of an apparent shift in Saudi foreign policy, which has seen Riyadh halt a $3bn funding package to the Lebanese army after Beirut failed to condemn attacks on Saudi diplomatic missions in Iran.