While Europe continues its endless debate about whether to bail out Greece’s economy, Greek citizens face a far more immediate crisis. Their banks are running out of cash, and so are they.

Since December, Greek residents have been pulling their euros out of Greek banks at a rapid rate. Deposits are down more than 20 percent through May compared with the previous year, and that decline probably accelerated in June as the steady outflow morphed into a full-on bank run.

Anyone who has seen the classic Frank Capra movie “It’s A Wonderful Life” remembers the run on Bailey Brothers Building and Loan. The townspeople want to withdraw their deposits, and George Bailey, played by Jimmy Stewart, has to tell them that the cash isn’t there — it’s invested in the houses of their neighbors.

The clip is a great explainer of fractional reserve banking, a crucial concept of modern finance. Banks hold reserves for only a fraction of their deposits, so a bank run occurs when so many customers demand their cash from a bank that it can’t deliver on its promise to return it. Bank runs are made possible because a bank’s business model is to accept short-term, liquid cash and use it to make long-term loans and investments. When trust between the bank and depositor breaks down, the panic of a few depositors can create a self-fulfilling prophecy. Even perfectly healthy banks can go bankrupt.

Scenes out of Capra may be happening in Greece soon. Since December 2014, when the deposit flight began, the composition of the assets in the Greek banking system hasn’t changed much (it’s mostly loans and securities). But take a look at the liabilities (in the form of cash deposits and borrowed money) of all Greek banks in December 2014 and again in May 2015 :

See how the red bar, representing cash deposits, has shrunk over those five months? That represents the flight of cash from banks to beneath Greek mattresses. (Foreign financial institutions also withdrew their funding from Greek banks, as shown in green.) The banks replaced that funding with loans from the Bank of Greece, shown in the blue bar that grew dramatically.

The Bank of Greece is a rather odd institution: Ostensibly it’s the central bank for Greece, but because Greece is in the eurozone, the European Central Bank (ECB) really plays that role. The Bank of Greece just acts as an intermediary — it can request extra funds from the ECB to provide liquidity to Greek banks.

Since the Great Depression, the traditional role of a central bank — whether it’s the Bank of Greece, the ECB or (in America) the Federal Reserve — is to be the lender of last resort. That is, its role is to provide liquidity to the banking system to prevent total collapse in the face of a bank run.

In one sense, that job has been accomplished: The ECB has provided Greek banks (via the Bank of Greece) with some 60 billion additional euros since December. This is shown in the chart below: In green is the Bank of Greece’s loans to Greek banks to keep them afloat, and in red is the amount owed by the Bank of Greece to the ECB, as measured by Europe’s Target2 interbank payment system. You can see how the Bank of Greece’s lending closely matches how much it has borrowed from Europe.

You can also see that the current level of borrowing is not unprecedented. For much of the 2011-12 period — the first phase of the eurozone crisis — Greece borrowed and lent similarly large amounts. And so this is just a shell game: The Bank of Greece’s balance sheet reveals that it has built up liabilities to the ECB. In particular, because the ECB has provided emergency liquidity to the Bank of Greece to help retail banks meet the panicked demands of depositors, the Bank of Greece effectively owes other eurozone central banks about 100 billion euros.

If Greece leaves the eurozone, a currency mismatch between that debt to Europe (measured in euros) and a possible new Greek currency will cause major headaches. This is where the line between Greece’s bank run and a “Grexit” starts to blur. If Greece were to leave the eurozone and issue a new currency, it would surely be worth far less than the euro. But Greece’s external debt would still be valued in euros. So Greece’s already enormous debts would be made even more unpayable. Another, larger debt default would be likely.

The Greek banking system is extremely fragile, and appears to be at the mercy of the ECB. If the ECB were to pull the emergency funding it has extended (through the Bank of Greece), Greece’s banks would go from being illiquid to insolvent. Greek residents, desperate for cash to buy basic goods and services, are clamoring for the end of the bank holiday and capital controls. What comes next is hard to predict. A new deal with eurozone creditors and extra support from the ECB could ameliorate the crisis. But without extraordinary support, Greek banks are nearing a meltdown.