Image caption The government took a 45% stake in Bankia earlier in the week

The Spanish government is to force its banks to take on an extra 30bn euros ($39bn; £24bn) of capital to cushion themselves against loans going bad.

The banks will have to raise the money or borrow from the government at an annual interest rate of about 10%.

The government said it was determined to take the necessary measures to restore credibility and trust to the financial system.

Earlier in the week, the Spanish government took a 45% stake in Bankia.

Bankia had a 4.47bn-euro loan by the Spanish bailout fund converted into shares.

Independent valuation

The Spanish government has already forced banks to make provisions of 54bn euros to cover bad loans.

If banks have to go to the government to borrow money, the loans will be structured so that they could ultimately be converted into partial state ownership.

The government is now appointing independent auditors to value the banks' property assets.

A housing boom and bust has left many small lenders holding mortgage debt that may not be repaid.

The banks will also be forced to put some of their mortgage books into separate companies.

The government said it would also be liberalising rules for property rental to make it easier for the banks to sell their portfolios of property debt.

The Madrid stock market fell more than 3% after the reforms were announced.

Deficit targets

Earlier in the day, the European Commission had warned that "the necessary adjustment of bank balance sheets" would make it harder for individuals and businesses to borrow money, which would constrain the economy.

It predicted that the Spanish economy would contract by 1.8% in 2012 and by 0.3% in 2013.

The Commission also said that Spain's budget deficit would be 6.4% this year and 6.3% next year.

But Spain's economy minister Luis de Guindos said that the country would meet its target of a 5.3% deficit this year and 3% in 2013.

He added that the money to be loaned to banks would have no effect on the deficit.

The banking sector was cited by the ratings agency Standard & Poor's when it downgraded Spain's debt by two notches at the end of last month.

Figures from the Bank of Spain show that at the end of 2011, banks held 184bn euros worth of problematic real estate assets, including loans and seized property, accounting for 60% of their property portfolios.