The measures, approved by the Commission on Wednesday, are a condition of 40 billion euros ($52 billion) in aid that offers hope for an end to a banking crisis which has pushed Spain to the brink of a sovereign bailout to keep the government afloat.

The plan sets in motion one of the biggest overhauls of any European banking system since the financial crisis began in mid-2007 with the near collapse of German lender IKB.

"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 Union Competition Commissioner Joaquin Almunia.

The Spanish state took over Bankia (>> Bankia SA), Catalunya Banc, Banco de Valencia (>> Banco de Valencia SA) and Novagalicia Banco - which is also known as NCG Banco - after losses on lending during a decade-long property boom left them dangerously short of capital.

The four banks account for just under a fifth of Spain's banking system. They must transfer 45 billion euros of soured property assets to a "bad bank" as another condition of receiving the aid.

The smallest of the four, Banco de Valencia, will be sold to Caixabank (>> CaixaBank SA) for a symbolic one euro and cease to exist as a separate entity, while the other three must cut their balance sheets by more than 60 percent over the next five years.

Shares in Banco de Valencia, which had been suspended on Wednesday morning, dropped by more than 16 percent after they resumed trading, to 0.152 euro per share.

The International Monetary Fund (IMF) said on Wednesday that Spain's financial sector reform is on track and all deadlines have been met so far, but difficult steps remained while risks for the economy and the country's lenders remain high.

JOB LOSSES

Selling Banco de Valencia under a loss protection scheme will be cheaper than winding it down, the Commission said. Spain has also agreed to sell Novagalicia Banco and Catalunya Banc within 5 years or liquidate them, Almunia said.

The nationalized banks will have to close up to half their branches during the five-year overhaul, resulting in thousands more job losses in a recession which has already pushed unemployment up to 25 percent.

The biggest of the banks, Bankia, said it would lay off 6,000 staff - over a quarter of its workforce - and reduce its branch network by around 39 percent under a plan to return to profitability by 2013.

"Our clients can be totally reassured because we have a viable and solid business in which they can be absolutely sure of their savings," said Chairman Jose Ignacio Goirigolzarri.

Bankia, formed from the merger of seven savings banks in 2010 and taken over in May in Spain's biggest bank rescue, said it would shed 50 billion euros of assets. These include stakes in insurer Mapfre (>> Mapfre SA) and airline International Airlines Group (>> International Consolidated Airlines Grp) plus its business in Miami in the United States.

Public debt holdings would fall to 30 billion euros from 40 billion now, Bankia said, while shareholders will contribute 10.7 billion to the clean-up. Bankia shares fell 4 percent.

Holders of Bankia's hybrid debt would contribute up to 4.8 billion euros to the recapitalization through losses incurred by swapping their holdings for shares, the bank said.

The Commission said the cost to hybrid and subordinated bondholders in the restructuring of all four of the nationalized banks will come to about 10 billion euros.

Many hybrid debt holders are retail customers who say they were conned into buying complex financial instruments that buoyed the banks' capital levels, instead of putting their money into fixed-term savings accounts.

The Spanish government, fearing a political backlash, fought for these losses to be minimized, but Brussels insisted the subordinated bondholders share the pain in order to keep the use of taxpayers' funds to a minimum.

Almunia, a former Spanish government minister, said he would decide on other Spanish banks with capital shortfalls on December 20. Banco Popular (>> Banco Popular Espanol SA) has carried out a 2.5 billion euro share and rights issue to avoid the need to seek state aid. ($1 = 0.7733 euros)

(Additional reporting by Robin Emmott in Brussels and Jesus Aguado in Madrid; editing by Anna Willard and David Stamp)

By Foo Yun Chee and Sonya Dowsett