The European Commission has approved Spain's plans to restructure four of its weakest banks, clearing the way for them to receive nearly 37 billion in fresh capital from the eurozone's bailout fund.
All four banks were nationalized to prevent them collapsing after Spain's property bubble burst, leaving them facing massive losses on their loan books.
The bailout should allow three lenders - BFA-Bankia, NCG Banco and Catalunya Banc -- to become viable in the long term without continued state support, the Commission said. Their balance sheets will be reduced by 60% by 2017.
The fourth, Banco de Valencia, will be sold to CaixaBank and will cease to operate independently.
"Our objective is to restore the viability of banks receiving aid so that they are able to function without public support in the future," said European Competition Commissioner Joaquin Almunia. "Restoring a healthier financial sector capable of financing the real economy is indispensable for economic recovery in Spain."
Independent stress tests conducted on the Spanish banking sector earlier this year identified a capital hole of about ???59 billion.
Spain's eurozone partners have agreed to provide up to ???100 billion from the currency area's permanent bailout fund -- the European Stability Mechanism -- but only once restructuring plans are submitted and approved.
The overhaul requires the banks to cease lending to the real estate sector, limit their activities in wholesale funding, and focus on providing services to retail clients and small businesses. Real estate assets are being transferred to an asset management company or "bad bank".
Spain has committed to privatize NCG and Catalunya Banc before the end of the five-year restructuring period. Bankia, the biggest of the four lenders, and Catalunya will sell their fixed-income trading businesses.
Bankia said it would shed 6,000 jobs, more than a quarter of its staff, and close around 1,200 branches over the next three years.
The International Monetary Fund said Spain was on track with its efforts to emerge from the banking crisis, but said implementing the restructuring and making the "bad bank" effective were challenging steps that would have to be taken in the face of further economic headwinds.
Spain is suffering its second recession in three years and its economy is expected to contract further in 2013. Unemployment stands at 25%.
"Although this outlook remains broadly consistent with the baseline scenario used in the bank stress tests, risks around the baseline are large," the IMF said.
Standard & Poor's cut its rating on Spain last month, citing the risk of social discontent and rising tensions between the central government and Spain's semi-autonomous regions.
Weekend elections in Catalonia resulted in a majority for parties that support independence.
The European Commission is expected to decide next month on restructuring plans for a second group of Spanish banks -- Banco Mare Nostrum, Banco Caja 3, Liberbank and Ceiss, which also failed the stress tests.
Spain has held off joining Greece, Ireland and Portugal in requesting a full-blown bailout, but some analysts believe it is only a matter of time. A "doom loop" of spending cuts and weaker-than-expected growth may make it impossible for Spain to meet its budget targets.
The yields on Spain's 10-year bond fell to around 5.4%, and the spread to the benchmark German bond narrowed, as investors welcomed the bank bailout news. The yield touched 7.5% earlier this year, but has fallen back sharply since the European Central Bank announced it was ready to buy bonds of troubled eurozone nations provided they request a bailout.