German economic growth slowed last year as the eurozone debt crisis undercut exports and corporate investment, data released on Tuesday by the statistics office showed.

The nation's gross domestic product (GDP) grew by a less-than-forecast 0.7 per cent in 2012 after it expanded 3 per cent in 2011. Analysts had expected GDP to come in at 0.8 per cent last year.

In a preliminary estimate, the statistics office sees the economy shrinking by 0.5 per cent in the final quarter of 2012, with Chancellor Angela Merkel's government expected to announce Wednesday that it had slashed its 2013 growth forecast to a mere 0.4 per cent.

“The German economy proved to be resistant during 2012 in a difficult economic environment and withstood the European recession”, said Federal Statistical Office President Roderich Egeler at a press conference.

The nation also posted its first budget surplus since 2007 last year. The surplus stood at 0.1 per cent of GDP after a deficit of 0.8 per cent in 2011, the statistics office.

This compares with many of Germany's partners in the 17-state eurozone, which are battling to bring their public deficits down below the 3-per-cent target for euro members.

Separate data released by the European Union Eurostat showed eurozone exports rising 0.8 per cent November - the first increase since August. Imports, however, fell 1.5 per cent.

The German statistics office said the nation's export growth slowed to 4.1 per cent last year from 7.8 per cent in 2011 as a result of the recession and fiscal austerity that has taken hold in many of its key trading partners in the eurozone.

At the same time, investment in machinery and equipment contracted by 4.4 per cent in 2012 after growing by 7 per cent in the previous year.

While consumer spending growth slowed from 1.7 per cent to 0.8 per cent, government spending rates held steady at 1 per cent.

Inflation stood at 2 per cent last year, the statistics office said.

The bleak economic times in the eurozone also coincided with a slowdown last year in the world's two biggest economies - the United States and China.

The signs of slowing growth comes as German Chancellor Angela Merkel gears up for an election, which is likely to be held in September.

However, analysts are expecting a pickup in the economy as the year unfolds and world trade rebounds.

“The good news is that leading indicators point to the German economy staging a swift comeback,” said Andreas Rees, chief German economist with Unicredit bank.

German business confidence rose for the second consecutive month in December, the Munich-based Ifo institute said last month.

Ifo's closely watched climate index ended the year on a positive note, increasing more than expected to 102.4 points last month from 101.4 in November.

In the meantime, Germany's central bank, the Bundesbank, said last month the nation's economy is likely to stagnate in the first quarter this year after a sharp contraction in the final three months of 2012.

Official sources say German Economics Minister Philipp Roesler will forecast Wednesday that the economy should expand by 1.6 per cent in 2014.

The statistics office is scheduled to publish its official estimate of German fourth-quarter GDP on February 14. - Sapa-dpa