Prime Minister Mariano Rajoy announced Wednesday that Spain slashed its public deficit to 6.7 percent of economic output in 2012, a drastic cut in the midst of a recession yet still short of its European Union target.
Rajoy's conservative government rammed through unpopular austerity cuts and tax increases as it struggled to lower the public deficit to an EU-agreed target of 6.3 percent of gross domestic product in 2012 from 9.4 percent the year before.
Spain's budget-cutting achievement will likely be welcomed by financial markets despite missing the goal set with Brussels.
But the cost-cutting, coming at a time when Spain is in deep recession with a jobless rate of 26 percent, has sparked regular, mass street protests.
"It represents a huge effort by the whole of Spanish society," Rajoy told a session of parliament.
"It will no doubt lead to a boost in confidence in Spain."
The deficit figure excludes the cost of rescuing Spain's banking system from a mountain of bad loans built up since a 2008 property crash, however.
Spain has already spent more than 40 billion euros ($52 billion) to clean up its banks' balance sheets, using a rescue loan extended by its eurozone partners of up to 100 billion euros, and it will have to pay that money back.
Since coming to power in December 2011, Rajoy's Popular Party government has launched measures to find 150 billion euros in savings between 2012 and 2014 in spending cuts and tax increases.