Spain stamped out immediate fears of a banking catastrophe today by nationalising its fourth-largest listed bank, Bankia.

Bankia's stock slumped, but the rest of the financial sector rallied after the dramatic U-turn by Prime Minister Mariano Rajoy's government.

Up to this it had refused to countenance using public money.

The government said the state would take a 45% stake in Bankia by converting a state-backed loan of €4.465 billion into shares in the parent company. 

The transaction, announced last night, means the government "will take control", an Economy Ministry statement said.

Shares in Bankia fell 3.6% this evening ahead of the state takeover, which would dilute other shareholders' stakes and could threaten the payout of dividends. But the rest of the market rallied, sending the leading IBEX-35 index up 3.4%. Santander, the euro zone's largest bank by capital, was up over 5%.

Bankia shares are down over 16% so far this week in a turbulent week which started with executive chairman Rodrigo Rato resigning.

Rato, a former Spanish economy minister and ex-managing director of the International Monetary Fund, was replaced Wednesday by experienced banker Jose Ignacio Goirigolzarri.

Bankia, an amalgam of seven shaky savings banks created in 2010, was at the centre of financial sector concerns. The bank had the industry's largest exposure to the property market at €37.5 billion at the end of 2011, of which €31.8 billion were classed as problematic.

Madrid is throwing it a lifeline by converting into capital a five-year state loan extended in December 2010 at an annual interest rate of 7.75% to Bankia parent group Banco Financiero de Ahorros (BFA).

One of the biggest worries for investors is that they do not know the real value of the banks' exposure to the property sector, nor how far the troubles have spread.

Analysts said that the general feeling is that Spanish banks have worse problems than previously thought. They said the Bankia move may not be sufficient and they expected that at some point the European Union would have to intervene to rescue the sector.

The state takeover provides a grim backdrop to Spain's banking reforms, expected to be announced tomorrow. An economy ministry official said the government would issue new rules on forcing banks to boost their financial cushion against property assets, declining however to give a figure.

The new requirement could amount to €35 billion, said business daily Cinco Dias. That is in addition to the €53.8 billion in provisions already demanded in a reform announced in February.

In an attempt to soothe markets, the government had already said it would approve tomorrow another reform aimed at enabling banks to transfer problem loans from their balance sheets to separate agencies. But it has said this will be done without using state money.

Spain to miss 2012 deficit target: EU source

The European Commission is to forecast that Spain will miss its deficit reduction target for 2012 despite budget cuts undertaken by the government, an EU source said today.

Spain had pledged to cut its deficit to 5.3% of gross domestic product this year but the commission will indicate as part of EU-wide economic forecasts on Friday that Madrid will fail to reach that goal, the source said.

"Spain is not on track. It will not meet the objective for this year," said the source, who is close to the issue but refused to say by how much Madrid will miss the target. The source rejected reports that Spain's deficit would reach 6% this year.

The Spanish government announced earlier this year that its 2011 deficit was much higher than previously forecast, at 8.5% instead of 6%.

Spain was originally supposed to bring the deficit down to 4.4% this year, but Prime Minister Mariano Rajoy convinced EU partners to raise the target to 5.3%.