Spain's economy, still reeling from a 2008 property market crash, fell into a double-dip recession in 2011 and the unemployment rate has since soared to
more than 27 percent.
Prime Minister Mariano Rajoy's conservative government has pursued an austerity policy even in the face of mass protests in the streets, but it now says the recession is close to bottoming out.
Economy Minister Luis de Guindos said on Tuesday that the country was "coming out of the recession" and on Monday day Budget Minister Cristobal Montoro said the economy was at a turning point.
The International Monetary Fund, in an annual review of the eurozone's fourth-largest economy, agreed that the contraction may be coming to an end.
But it cautioned that tough times lay ahead.
"While there are signs the economic contraction may end soon, the outlook remains difficult," the Washington-based Fund said in a report.
The IMF said it expected the Spanish economy to start to grow later this year and to pick up to a pace of one percent in the medium term, with only "limited" gains in employment.
Spain's borrowing costs soared in mid-2012 as investors fretted about its bulging annual deficits, soaring debt, recession and joblessness, pushing the country close to an international bailout.
In the end, Spain avoided a full-blown rescue but was thrown a 100-billion-euro credit line by its European Union partners to clean up bad loan-ridden banks.
So far, Madrid has used only 41.3 billion euros of that money.
The IMF welcomed Spain's recent strong export performance but cautioned that corporate and consumer struggles with high debt could slow the economy.
In addition, the IMF said that social security contributions should be reduced immediately and that salaries should come down significantly.