Much of the crushing debt that was racked up by the former is owed to the latter.

LONDON — The alarm over potential bank runs in Greece and Spain this week has highlighted an often-overlooked fact: Europe's debt crisis is also, in many ways, a major banking crisis.

In capitals such as Athens, Madrid and Rome, large portions of the sovereign debt racked up by spendthrift governments are owed to the countries' own banks, locking governments and the banks in an embrace so tight that disaster for one would almost certainly spell doom for the other.

International bailouts for Greece, Ireland and Portugal have helped to keep not just their governments but also their banks afloat, as well as financial institutions in other parts of Europe with large exposure to those nations' debts.

Though worried investors have mostly focused on the dire consequences of government default, reports of depositors pulling out large sums in Greece and Spain are shifting attention to those beleaguered banking systems and the catastrophic effects of a full-on run.

For The Record Los Angeles Times Friday, May 25, 2012 Home Edition Main News Part A Page 4 News Desk 2 inches; 67 words Type of Material: Correction Spanish debt: An article about the effect of public debt on European banks in the May 19 Section A said that Spain was among the nations suffering from debt loads caused by spendthrift governments. Unlike in some other countries, Spain's increasing debt load was primarily caused by a real-estate bust and plunging public revenue. It has been worsened by the government's failure to rein in public spending.

On Friday, the Fitch ratings agency downgraded the creditworthiness of five Greek banks.

That followed a similar demotion of 16 Spanish financial institutions by the Moody's ratings firm Thursday evening.

Neither of the two Mediterranean nations is yet experiencing anything close to a major run on their banks, analysts say. There are no lines of frightened customers desperate to withdraw cash, and the banks in both countries together hold hundreds of billions of dollars' worth of euros.

But with the euro crisis having reached yet another feverish pitch, stock markets and the values of banking shares are yo-yoing wildly.

"It's the uncertainty that's the principal reason for alarm in this," Iain Begg, an expert on European economy and finance at the London School of Economics, said Friday.

Investors were unsettled by a report that about $900 million was taken out of Greek banks on Monday alone, adding to the already steady flight of capital since Greece's debt problems broke open 21/2 years ago.

On Thursday, a newspaper report of a major withdrawal from Spain's Bankia pushed the newly nationalized bank's shares into free fall until a government minister publicly denied that a run was taking place.

Many of Europe's debt-stricken countries are now caught up in a dangerous cycle. Cash-starved governments are being heavily financed by their nations' banks through massive bond purchases. But the banks' exposure to all that shaky sovereign debt has made it difficult for them to raise money on the open market because investors are skeptical.

That, in turn, increases the chances that the governments will have to step in and bail out the banks, giving rise to a situation akin to a dog chasing its tail until it finally collapses.

"The presumption in normal times is that the safest asset is the equivalent of a treasury bond," but that premise no longer holds, Begg said. "Once that starts to be undermined, it becomes a potential hole in the balance sheets of the banks."

In September, the International Monetary Fund warned that Europe's debt crisis could cost the region's banks nearly $400 billion.

In many ways, Spain has become the epitome of a banking system in distress.

Its financial institutions are weighed down by bad real estate loans left over from a property boom-gone-bust and by huge holdings of government debt. Spanish banks now hold the majority of the country's treasury bonds.

"It's very unsafe for a bank to buy debt in its own government, because it's like putting all your eggs in one basket," said Rolf Campos, an economist at Spain's IESE Business School. The outcome "depends on whether you drop the basket or not."

"If Spain is able to pay off its debt, then it won't be a problem. But if Spain has to default on some of its debt, which is not likely but is possible, it will have been a very bad investment decision."

The government last week unveiled a plan to force Spain's banks to come up with $40 billion to help balance out their toxic assets. But critics say the state could end up shouldering much of the cost of the banking reform, further degrading its own financial position.

Just how much trouble Europe's banks have had raising cash was revealed by Benoit Coeure, a member of the executive board of the European Central Bank.

Last fall, it had become so difficult for banks in the 17-nation Eurozone to get commercial financing that "we were very close [to] having a collapse in the banking system in the euro area, which ... would have also led to a collapse in the economy and to deflation," Coeure said in an interview broadcast Thursday on the BBC.

The ECB intervened by providing a stunning $1.3 trillion in unusually cheap long-term loans to European banks in December and February. The loans helped buoy the banks, but also indirectly propped up governments, because the banks used the money to buy more government bonds.

The move fueled rallies for Spanish and Italian debt, whose interest rates had begun creeping up to intolerable levels that could have forced Madrid and Rome to seek bailouts. But it further increased the co-dependency between governments and banks.

And the ECB itself is now a major holder of sovereign debt, including Greek bonds.

A run on the banks in politically unstable Greece could trigger a collapse of the country's financial sector and a default by the government, leaving the ECB as much in the lurch as other bondholders.

"The European Central Bank itself is now a major creditor of Greece.... We don't quite know what'll happen if the European Central Bank is confronted with its paper being worthless," said Begg. "That's uncharted territory."