Germany's economy minister says that exports are a pillar of the German economy
German exports rose 0.3% in May from the month before, raising hopes of a tentative economic recovery.
Imports declined 2.1%, pushing Germany's trade balance to a surplus of 10.3bn euros ($14.4bn; £8.9bn), the highest since December 2008.
However, exports were still 24.5% lower than a year ago, with Germany enduring its worst recession since World War II.
Analysts said the data raised hopes that exports would continue to improve in the coming months.
"We can't talk about a change in trend. But the free fall appears to have stopped," said Thorsten Polleit, an analyst at Barclays Capital.
"This isn't the start of an upswing, however, but rather a recovery from a low level. The economies of many important trading partners remain weak," he added.
Germany's economy minister Karl-Theodor zu Guttenberg told the BBC that Germany would not reduce its reliance on exports.
"We are highly export-orientated. That's absolutely clear. So we feel the effect of the crisis harder than others," he said.
"But the ability to have a strong export pillar in our economy will be a (way) to get out of the crisis," he added.
There had already been signs that German firms were experiencing a turnaround in fortunes.
German industrial output rose by a surprise 3.7% in May compared with April, and factory orders have improved.
A survey last month by the IFO Institute said confidence in companies across all sectors of the economy had risen to a seven-month high in June.