Moody's gave Madrid critical breathing room Tuesday in its efforts to sort out its economic problems, holding the country's debt rating unchanged at Baa3, one step above "junk" grade.
But the US agency assigned Madrid a "negative outlook," maintaining a threat to downgrade the country if conditions deteriorate.
Moody's cited the European Central Bank's willingness to buy Spanish government bonds to stabilize its borrowing rate as well as the government's commitment to implementing fiscal and structural reforms necessary to improve its finances.
Moody's also credited the ongoing efforts to restructure the Spanish banking sector and strengthen the banks.
"In summary, Moody's believes that the combination of euro area and ECB support and the Spanish government's own efforts should allow the government to maintain capital market access at reasonable rates, providing it with the time it needs to stabilize public debt over the next few years."
"The maintenance of market access is critical because the risk that some form of burden-sharing will be imposed on bondholders is material for those countries that rely entirely or to a very large extent on official-sector funding for an extended period of time."
But Moody's warned that the risks to the country's situation remain "skewed to the downside," and that the rating could go lower without progress on setting the country's finances on a sustainable footing.
"Shocks at the euro area level could also have negative repercussions on Spain's rating, for example in the absence of concrete progress in reforming the euro area's fiscal, economic and regulatory institutions."
"The possibility of Greece exiting the euro area continues to constitute a major event risk for all the weaker euro area member states."
The move came a week after Moody's rival Standard & Poor's dealt Spain a two-step downgrade to BBB-, S&P's lowest grade before junk level.
Cutting Madrid's grade to junk status could send a large class of bond investors fleeing the country's debt paper, and effectively forcing the cost of Spain's borrowing shooting higher.