Germany's trade surplus was the second highest in more than 60 years in 2012, pointing to an underlying resilience in Europe's largest economy, although both imports and exports disappointed in the last month of the year.
Exports rose just 0.3 per cent in December from November, compared with a forecast rise of 1.3 per cent, and imports fell 1.3 per cent against expectations for a rise of 1.4 per cent.
Analysts blamed poor demand from the euro zone and beyond for the weakness of exports, and Germans' reluctance to spend for the fall in imports, but pointed to signs of recovery ahead, including a 0.8 per cent rise in December industrial orders.
"Imports fell noticeably in December but were stronger then exports over the entire quarter, which really weighed on economic growth," said economist Andreas Scheuerle at Deka Bank.
"Looking forward the sky is brightening. Global early indicators have improved noticeably and give hope that export business will improve again."
Germany's economy shrank by 0.5 per cent in the last three months of 2012 – its worst quarterly performance since a recession amid the global financial crisis in 2008/2009.
Most economists expect it to grow, albeit weakly, in the first quarter of this year and therefore escape recession, defined as two consecutive quarters of contraction.
But its ability to recover more strongly will be of crucial importance to Europe's hopes of emerging from four years of debt crisis and recession.
"We went through a period of weakness in exports in the second half of the year. If we look at industrial orders, it seems we are at a turning point," said Citigroup economist Juergen Michels.
"But even though the latest industrial orders show positive numbers from the ... euro zone, we assume the main part of the recovery will come from countries beyond the euro zone. Demand is especially strong in the USA and China. That will be dampened by the euro."
The trade surplus rose to €16.8-billion ($23-billion U.S.) in December from an upwardly revised €15.6-billion in November, surpassing the consensus forecast in a Reuters poll for a surplus of €14.8-billion.
European Central Bank chief Mario Draghi weakened the euro on Thursday with a subtle hint of concern about the impact of the currency's recent strength on a euro zone economy reeling from the impact of searing budget cuts across its southern half.
That undermines Spain, Portugal and others' efforts to be more competitive in markets beyond the currency bloc – but there were signs in Friday's data that they are at least selling more and buying less from Germany.
In 2012 German exports to the euro zone declined 2.1 per cent while imports from the single currency bloc rose 0.7 per cent. That may largely be a sign of the weak demand in Spain, Italy and elsewhere, but if continued it would go some way to addressing the bloc's long-term problem with Germans selling more goods abroad than they spend at home.
"Germany made a contribution to the rebalancing of the euro zone in 2012, but offset the inevitable loss with success elsewhere," said Christian Schulz at Berenberg bank.
"For the coming months and for 2013 we expect an improvement in domestic demand and therefore an increase in imports, which will be helped by the strong euro."
Recent data has shown Germany's private sector expanding at its fastest rate since June 2011, investor sentiment brightening, consumer morale taking a turn for the better and unemployment falling.