Borrowing costs for Spain surged in its first bond auction since Standard & Poor's slashed its credit rating citing growing debt, weak banks and recession.

The Treasury raised €2.516 billion in three and five-year honds, just above its target range of €1.5-2.5 billion, Bank of Spain figures showed.

Demand outstripped supply by more than three-to-one. But Spain had to offer sharply higher returns, exceeding 4%, to secure the sale.

Standard & Poor's cut Spain's sovereign debt rating by two notches on April 26.

It warned that the budget situation was worsening and that the state was likely to have to prop up its banks.

Official data earlier this week showed that the economy had dropped into recession, barely two years after Spain emerged from the last downturn, triggered by a global financial crisis and property bubble implosion.

The European Central Bank has helped to lower yields on fragile euro zone bonds by flooding banks with over €1 trillion in cheap loans, which in turn flowed into the bond markets. But Spanish debt is still under pressure as many doubt the government can meet ambitious deficit-cutting goals given the recession and a 24.4% jobless rate in the first quarter.

In addition, investors fear Madrid could be forced to use public money to help the banks, despite the government's determination to make the banks pay for their own rescue.

Problem property loans held by Spain's banks amounted to €184 billion at the end of 2011, equal to about 60% of the entire property portfolio, Bank of Spain figures show. The ratio of bad loans - those at least three months in arrears - hit an 18-year high in February of 8.15% of total credit extended, the central bank says.

A breakdown of the latest bond auction results showed that for the three-year bonds, the yield jumped to 4.037% from 2.617% at the previous comparable auction on March 1.

Rates also leapt for the two types of five-year bonds on offer. For one five-year bond the yield shot to 4.752% from 3.565% on February 2; and for the other it soared to 4.960% from 3.696% in the last similar auction in February 2005.

Spain missed its deficit target by a large margin last year, allowing it to hit 8.5% of gross domestic product rather than the 6% agreed with the European Union. After a series of biting and unpopular austerity measures, the government says it is determined to get the deficit down to 5.3% this year and 3% - the EU-wide deficit ceiling - in 2013.

"In our opinion, these targets are currently unlikely to be met given the economic and financial environment," S&P said last week, forecasting instead a deficit of 6.2% of GDP this year and 4.8% in 2013.