Lebanon is grappling with a deep economic crisis after successive governments piled up debt following the 1975-1990 civil war with little to show for their spending binge.
Banks, central to the service-oriented economy, are paralysed. Savers have been locked out of dollar accounts or told funds they can access are worth less. The currency has crashed, driving a swathe of the population into poverty.
WHERE DID IT GO WRONG?
Lebanon's financial collapse since 2019 is a story of how a vision for rebuilding a nation once known as the Switzerland of the Middle East was derailed by corruption and mismanagement as a sectarian elite borrowed with few restraints.
Downtown Beirut, levelled in the civil war, rose up with skyscrapers built by international architects and swanky shopping malls filled with designer boutiques that took payment in dollars.
But Lebanon had little else to show for a debt mountain equivalent to 150% of national output, one of the world's highest burdens. Its electricity plants can't keep the lights on and Lebanon's only reliable export is its human capital.
HOW DID IT BORROW SO MUCH?
Some economists have described Lebanon's financial system as a nationally regulated Ponzi scheme, where new money is borrowed to pay existing creditors. It works until fresh money runs out. But how did the nation of about 6 million people get there?
After the civil war, Lebanon balanced its books with tourism receipts, foreign aid, earnings from its financial industry and the largesse of Gulf Arab states, which bankrolled the state by bolstering central bank reserves.
Yet one of its most reliable sources of dollars was remittances from the millions of Lebanese who went abroad to find work. Even in the 2008 global financial crash, they sent cash home.
But remittances started slowing from 2011 as Lebanon's sectarian squabbling led to more political sclerosis and much of the Middle East, including neighbouring Syria, descended into chaos.
Sunni Muslim Gulf states turned away with the rising influence in Lebanon of Iran, via Hezbollah, a heavily armed Lebanese Shi'ite group whose political power has grown.
The budget deficit rocketed and the balance of payments sank deeper into the red, as transfers failed to match imports of everything from staple foods to flashy cars.
That was until 2016, when banks began offering remarkable interest rates for new deposits of dollars - an officially accepted currency in the dollarised economy - and even more extraordinary rates for Lebanese pound deposits.
Elsewhere in the world savers earned tiny returns.
Given the Lebanese pound had been pegged to the dollar at 1,500 for over two decades and could be freely exchanged at a bank or by a supermarket cashier, what was there to lose?
Dollars flowed again and banks could keep funding the spending binge.
HOW COULD BANKS OFFER SUCH HIGH RETURNS?
Lebanon was still politically dysfunctional. Rivalries left it without a president for most of 2016.
But the central bank, Banque du Liban, led by former Merrill Lynch banker Riad Salameh since 1993, introduced "financial engineering", a range of mechanisms that amounted to offering banks lavish returns for new dollars.
Improved dollar flows showed up in climbing foreign reserves. What was less obvious - and is now a point of contention - was a rise in liabilities. By some accounts, the central bank's assets are more than wiped out by what it owes, so it may be sitting on big losses.
Meanwhile, the cost of servicing Lebanon's debt surged to about a third or more of budget spending.
WHAT TRIGGERED THE COLLAPSE?
When the state needed to rein in spending, politicians splurged on a public sector pay rise before the 2018 election. And the government's failure to deliver reforms meant foreign donors held back billions of dollars in aid they had pledged.
The final spark for unrest came in October 2019 with a plan to tax WhatsApp calls. With a big diaspora and Lebanon's low tax regime skewed in favour of the rich, slapping a fee on the way many Lebanese kept in touch with relatives was disastrous.
Mass protests, driven by a disenchanted youth demanding wholesale change, erupted against a political elite, many of them aging warlords who thrived while others struggled.
Foreign exchange inflows dried up and dollars exited Lebanon. Banks no longer had enough dollars to pay depositors queuing outside, so they shut their doors.
The currency collapsed, sliding from 1,500 to the dollar to a street rate around 15,000 in June this year.
Compounding problems, an explosion on Aug. 4 at Beirut port killed about 190 people and caused billions of dollars of damage.
WHAT HAPPENS NOW?
France is leading international efforts to push Lebanon to tackle corruption and implement other reforms demanded by donors. Crucially, Lebanon needs to form a new government so it can resume stalled talks with the International Monetary Fund.
But politicians and bankers need to agree on the scale of the vast losses and on what went wrong, so Lebanon can shift direction and stop living beyond its means.