Moody's Investors Service left Spain's credit rating at investment-grade level, although it assigned a negative outlook due to persistent risks.

Moody's said Tuesday it decided to keep the Iberian nation's rating at Baa3 - one notch above "junk" - because the risk of it losing access to capital markets "has been materially reduced by the willingness of the European Central Bank to undertake outright purchases of Spanish government bonds to contain their price volatility."

The ratings agency, which had slashed Spain's rating by three notches in June, said the country "will likely apply for a precautionary credit line from the (recently established) European Stability Mechanism," which will cover all new bailout applications from euro-zone member state.

"This should in turn help sustain demand for Spanish government bonds by allowing the ECB to activate its Outright Monetary Transactions (OMT) program of secondary market purchases," Moody's said.

Moody's believes "this will help Spain maintain access to debt markets," Kathrin Muehlbronner, a Moody's vice president and senior sovereign-risk analyst, told Efe.

The yield on Spain's benchmark 10-year bond fell early Wednesday, due in part to Moody's ratings decision, falling to 5.59 percent at the start of trading even as the yield on the equivalent German bond rose to 1.59 percent.

That meant Spain's risk premium - the extra return investors demand to hold the country's 10-year note compared with equivalent German debt - dropped to 400 basis points for the first time since April 4.

Muehlbronner also said Tuesday's debt auction by the Spanish Treasury, in which it sold nearly 4.9 billion euros ($6.4 billion) worth of notes at the lowest interest rates since the spring, shows that the assumption that Spain will request a sovereign bailout has already had a positive impact on debt markets.

Moody's also hailed the Spanish government's "commitment" to implementing austerity measures and structural reforms to lower its budget deficit and reduce its debt burden.

The ratings agency also deemed positive the steps Spain has taken to restructure its banking sector and shore up institutions that were battered by the collapse of a long-building real estate bubble, saying they should "help to restore market confidence in Spain's banking system as a whole."

Moody's explained that it has a negative outlook for Spain because, among other risks, the country's "credit standing would be negatively affected by a lack of progress in placing the country's public finances on a sustainable footing."

Muehlbronner also expressed concerns about Spain's heavily indebted regional governments, telling Efe by phone that, although "we see progress and there's been a significant cut in spending," the "budgetary execution" by Spain's regional governments will be a persistent problem.

She also said Spain's overall economy is "very weak" and that the country could have problems reducing its deficit in line with EU mandates.

Moody's decision followed on the heels of last week's move by Standard & Poor's to lower Spain's credit rating by two notches to one rung above junk status. S&P also said it had a negative outlook for Spain's rating.

Efforts to comply with EU targets for reducing the budget deficit could prolong Spain's recession, S&P said.

The other "Big Three" ratings agency, Fitch, lowered Spain's credit rating by three notches from A to BBB in June, leaving it two notches above junk.

Spain is in recession for the second time in three years in large part due to the collapse of a long-building housing bubble, which left many of its banks saddled with toxic real-estate assets.

With its borrowing costs soaring, the country was forced to request a loan of up to 100 billion euros ($131 billion) from its euro-zone partners to prop up those ailing financial institutions.

The Iberian nation's unemployment rate currently stands at nearly 25 percent overall and more than 50 percent among young people.

Numerous businesses have failed amid the slump and tens of thousands of families have been evicted from their homes after falling behind on their mortgages. EFE