MADRID — Standard & Poor's has given Spain a welcome boost by affirming its credit rating Tuesday, in another sign that the government debt crisis that threatened to sink the euro has come off the boil, at least for the moment.

The agency said Spain's current, solid AA rating partly reflects the government's resolve to cut its deficit and enact reforms to make its struggling economy more productive.

That positive review from outsiders comes as a welcome relief for Spain's hard-pressed government and for worried European Union officials as they try to contain a crisis that has already forced Greece and Ireland to take bailout loans from their eurozone partners and the International Monetary Fund to avoid national bankruptcy

"The ratings on Spain reflect the benefits of what we view as a modern and relatively diversified economy, as well as our opinion of the government's continuing political resolve to deal with the outstanding challenges," said S&P's credit analyst Marko Mrsnik.

However, Mrsnik warned the country's rating will remain under pressure for months to come from the high level of private sector indebtedness, the economy's lax competitiveness and tough labor market conditions — unemployment in Spain remains at a painful 20 percent.

"The negative outlook reflects the possibility of a downgrade if Spain's fiscal position deviates materially, in our opinion, from the government's budgetary targets for 2011 and 2012," Mrsnik said.

S&P is forecasting that Spain's general government deficit will decline to 6.3 percent of national income in 2011 from 2010's 9.3 percent. The agency is predicting that Spain's economy will follow up the 0.2 percent contraction in 2010 with growth of 0.7 percent this year and 1.5 percent in 2012.

The sense of panic that gripped markets at the end of last and the beginning of this year has abated in recent weeks, as EU officials have raised expectations for a "comprehensive solution" to the currency union's debt crisis.

The renewed optimism has been most evident in the performance of the euro, which has risen around 10 cents since the middle of January to around $1.38. And though yields, or interest rates, on bonds from countries like Greece, Ireland, Portugal and Spain remain high, the European Central Bank felt confident enough to halt its bond purchases last week, a key lifeline that helped calm bond market jitters.

Though the debt crisis has fallen out of the headlines in recent weeks, it still is a long way from being solved.

"When you look at sovereign (bond) spreads compared to Germany nothing has changed," said Zsolt Darvas, a research fellow at Brussels-based think tank Bruegel.

Investors have taken a "wait-and-see attitude" on the comprehensive package promised by Brussels, said Darvas, and whether governments are willing to take the lid of the problems that have haunted the region since the collapse of Lehman Brothers in 2008.

There are a number of proposals being discussed. The EU's executive Commission wants governments to boost the size and powers of the eurozone's contribution to the bailout fund, the so-called European Financial Stability Facility.

In addition to raising the EFSF's lending capacity to the promised €440 billion, there are discussions to allow the EFSF to buy back bonds directly in the markets — as the ECB has been doing — and reduce the interest payments that bailed-out countries have to pay for their loans.

The Commission has also suggested allowing Greece and other financially troubled countries to use EFSF money to buy back their own bonds on the open market or from the ECB, which could reduce their overall debt obligations.

Germany has so far been reluctant to put up more money and ease the burden on bailed-out countries, fearing that they will fall back into their old spending habits. In return, the eurozone's biggest economy wants all euro states to sign up to tough measures to boost their competitiveness and cut spending.

Among the key points in German Chancellor Angela Merkel's package are demands to raise retirement ages in line with life expectancy, stop automatically increasing wages in line with inflation, introduce automatic "debt brakes" in national legislation, and find a common base for corporate taxation.

The demands — set to face fierce opposition from many countries and parliaments — are set to be discussed at a meeting of EU leaders in Brussels this Friday, although EU officials have said that decisions are unlikely before March.

Though such proposals have given the euro much-needed respite, there are many analysts who think that they will not be able to stop Europe's debt crisis from worsening, especially as many countries face years of tepid growth as governments continue to slash spending and raise taxes to get public finances into shape.

A particular worry is Spain's troubled savings banks — the so-called cajas.

They are widely identified as a key source of concern that the government might have to bail them out, which would seriously strain state finances. Two major Spanish dailies said Tuesday they are saddled with around €90 billion ($123 billion) in shaky real estate loans.

It was a burdensome bank bailout that drove Ireland to seek an international bailout last year.

Last week the Spanish government said it was raising the capital reserve requirements for banks in general and will be even tougher with the cajas, who could face partial nationalization later this year. They have already been forced to restructure in a government-mandated merger process that reduced their number from 45 to 17.

Comment on this story

The government has said the cajas will need no more than €20 billion in new capital to meet the new requirements but some analysts think that estimate is too low.

So far at least two major Spanish savings banks or groups, La Caixa and one led by Caja Madrid, have said they plan to create full-blown commercial banks so they can lure capital and raise their capital ratios.

__

Pan Pylas contributed from London. Gabriele Steinhauser in Brussels contributed to this report.