The European Commission has approved plans by the Spanish government to restructure four banks.
Bankia, NCG and Catalunya Banc have to cut their loans and investments by over 60% in the next five years, shut half their branches and shed thousands of employees .
A fourth bank that was in the worst shape, Banco de Valencia, is to be sold to Caixa Bank, which is privately owned.
The BBC reports the agreement means the banks will get almost 40 billion euros ($US52 billion) in loans from eurozone bailout funds.
All four were nationalised by Madrid after incurring heavy losses on loans to homebuyers and property developers.
Bankia, the largest of the four, announced on Wednesday that it would lay off 6000 employees and shut 39% of its branches.
The BBC reports the Commission's approval opens the way for Spain's government to draw 37 billion euros from a 100 billion euro loan facility made available specifically for the purpose of cleaning up the country's banks.
Last week, the Spanish central bank revealed that total losses at Spanish lenders had reached an all-time high of 182 billion euros in September.
Almost all of Spain's banks have cut their lending, as they try to restore their health, with the result that the entire economy is suffering from a credit crunch, alongside a property collapse and government austerity measures.
Spain is expected to remain in recession in 2013. The economy has been back in recession for over a year already.