Spanish skateboarderrs attack an ATM machine during a protest against government austerity measures.
NEW YORK (CNNMoney) -- Spain is fast becoming the biggest threat to Europe's shared currency as the cash-strapped government struggles to contain a growing banking crisis.
The depth of Spain's banking crisis was exposed late last week after the government announced a €19 billion rescue of one of the nation's top lenders, Bankia.
The move raised worries that Spanish banks face larger-than-expected losses on bad loans stemming from the collapse of the nation's housing bubble.
But the Spanish government does not have the money to bail out the entire banking sector, which analysts say could cost upwards of €100 billion. Madrid has already warned that it will miss its targets for deficit reduction this year.
The combination of mounting losses in the banking sector and the government's limited financial resources has raised fears Spain may need to be rescued.
"Spain is now seemingly drifting inexorably to a bailout of one sort or other," said Emily Nicol, an economist Daiwa Capital Markets.
In the markets, yields on Spanish bonds have increased as investors demand higher interest rates to assume the lending risk.
The yield on 10-year Spanish bonds rose to a high of 6.68% this week. That's approaching the level that ultimately led to bailouts for other struggling euro area nations, such as Greece, Ireland and Portugal.
While Spain is not on the verge of insolvency, the government cannot afford to pay interest rates at current levels for very long.
Spanish economy minister Luis de Guindos warned this week that current yields are "not very sustainable over the long term," according to reports.
In addition to the banks, Spain is potentially on the hook for the debts of several regional governments. On Thursday, ratings agency Fitch downgraded eight Spanish autonomous communities, citing larger-than-expected deficits and rising borrowing costs.
The European Union has increased its crisis resources, but the cost to bail out Spain could quickly burn through the region's firewall.
The European Stability Mechanism, a bailout fund that comes into effect this summer, will be equipped with €500 billion.
But the Spanish government has about €800 billion in outstanding debt, said Jay Bryson, global economist at Wells Fargo Securities.
"The question with Spain is do they help shore up banks or bail out the sovereign," said Bryson. "There's probably not enough political will in Europe to do both."
EU officials could allow the ESM to lend directly to banks, which would take some of the pressure off of the Spanish government to recapitalize the banks. But it remains to be seen if Germany, which has resisted expanding the bailout fund's powers, will back the idea.
The European Central Bank is also under pressure to intervene on Spain's behalf.
On Thursday, ECB president Mario Draghi criticized policymakers in Spain for underestimating the problems in the banking sector, particularly the cost of rescuing Bankia.
Draghi said the Spanish authorities were reluctant to admit the full scale of the banking crisis, which he said made things worse.
"There is a first assessment, then a second, a third, a fourth," Draghi said. "This is the worst possible way of doing things. Everyone ends up doing the right thing, but at the highest cost." The ECB has already funneled more than €1 trillion into the banking system by offering low-cost, long-term loans.
The flood of liquidity helped bring down borrowing costs for euro area governments, including Spain and Italy, as banks in those countries bought billions of euros worth of government debt.
But some analysts say the central bank policy has exposed banks in Spain to potential liabilities if the government is forced to restructure its debts.
Meanwhile, Spain is also struggling to overcome deep economic challenges as the government imposes additional austerity measures.
Spain slipped back into a recession in the first quarter, and unemployment stands at nearly 25% nationwide.
The unemployment rate in Spain is equivalent to that of the United States at the depths of the Great Depression, said Steven Kyle, a professor of economics at Cornell.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||4.29%||4.32%|
|15 yr fixed||3.26%||3.29%|
|30 yr refi||4.26%||4.29%|
|15 yr refi||3.24%||3.26%|
Today's featured rates: