The Spanish economy expanded by 0.2% in the fourth quarter, according to official estimates, boosted by exports.
For the whole of 2010 the National Statistics Institute estimated that the economy had contracted by 0.1%.
In September, the Spanish government approved an austerity budget, designed to cut public debt and regain investor confidence.
Analysts said that growth in the fourth quarter was largely down to increased demand for exported goods.
"I think growth was driven by a high contribution from both final domestic demand and exports," said Tullia Bucco, an analyst at Unicredit.
The Spanish government is under pressure from investors and other eurozone governments to reduce its deficit.
Eurozone governments are all aiming for deficits which do not exceed 3% of gross domestic product, in order to contain the bloc's debt problems.
To help meet its target, the Spanish government recently announced reforms to the pension system after reaching agreement with unions.
Under the agreement the compulsory pension age will increase from 65 to 67, one of the highest in Europe.
The increase will be phased in from 2013.
The budget approved last September included an overall cut in public spending of 7.7%, including a pay cut of 5% for public sector workers.
The government has also increased personal income tax for those earning above 120,000 euros ($162,000; £102,000) a year.
This increase is expected to raise about 170bn-200bn euros.
Madrid has promised its European counterparts to cut its deficit to 6% of GDP in 2011, from 11.1% in 2009.