Lebanon entered an unprecedented government crisis on Tuesday, with no president, a caretaker cabinet with limited powers and a deeply fragmented parliament.
The country is still struggling with a record-making financial meltdown that has impoverished most of the population.
What makes electing a president so difficult, what's at stake and who will govern Lebanon in this vacuum?
WHY SO COMPLICATED?
Lebanon's fractured, sectarian politics mean electing a new head of state or forming a new cabinet is never straightforward.
Parliament elects the president in a secret ballot by lawmakers in the 128-member parliament, where seats are evenly divided between Muslim and Christian sects.
But the thresholds needed to secure a quorum and victory mean that no single faction or alliance has enough seats to impose their choice - resulting in trading votes for other political favours.
Forming a cabinet is equally complex, with parties dividing up their shares of ministries based on influence, sect, parliamentary bloc size and possible posts they could be appointed to elsewhere in the state.
Aoun became head of state in 2016, thanks to a grand bargain endorsed by powerful Shi'ite group Hezbollah and Aoun's main Maronite Christian rival Samir Geagea, and which brought Sunni Muslim politician Saad al-Hariri back as prime minister.
Foreign influence can play a part in forging deals to elect a president in a country where international rivalries have long played out in domestic crises.
Aoun's predecessor - Michel Suleiman - took office in 2008 as part of a deal brokered in Qatar with Western backing.
WHY IS THIS SITUATION UNPRECEDENTED?
The horsetrading required to form a government or select a president has often left Lebanon either without a head of state or with a cabinet operating in a caretaker capacity.
But for the first time, it now has both simultaneously.
The country held parliamentary elections in May, which triggers the creation of a new cabinet while the old one continues basic governing work under a caretaker capacity.
Aoun nominated prime minister Najib Mikati to return as premier but did not approve Mikati's cabinet line-ups over the last six months - meaning no new government was formed.
In an interview with Reuters, Aoun warned of "constitutional chaos" if his term ended with no successor and no new cabinet.
In his final act as president, he declared the government "resigned" - reaffirming its caretaker capacity - and sent a letter to parliament urging it to keep Mikati in check.
The constitution stipulates that such a move compels parliament to meet in an extraordinary session until a new cabinet has been formed.
Parliament is set to meet on Thursday.
WHAT WILL THIS MEAN FOR GOVERNMENT, THE FINANCIAL CRISIS?
Lebanon's president is responsible for signing bills into law, appointing the prime minister and approving the cabinet formation before it goes to parliament for a vote of confidence.
Cabinet is responsible for making executive decisions.
The constitution says a resigned cabinet shall operate "in the narrow sense," without more details. In a presidential vacuum, it says parliament should meet urgently to elect one.
In previous presidential vacuums, cabinet took on the president's powers by taking decisions unanimously - but on his way out, Aoun insisted a caretaker government shouldn't be allowed to assume those prerogatives.
That throws into question how Lebanon will deal with the worsening financial crisis, which has impoverished more than 80% of the population and frozen savers out of cash in the paralysed banking system for three years.
The government reached a draft IMF deal in May that would unlock badly-needed aid. But Beirut has done little towards implementing reforms needed to seal the deal.
Deputy Prime Minister Saade Chami has said Lebanon could still submit its progress to the IMF board for review but was not sure if the final deal would require a president's approval.
(Reporting by Maya Gebeily and Laila Bassam, Editing by William Maclean)