German exports rose at their fastest pace this year in May, boosting expectations that Europe's largest economy will pull off stronger growth in the second quarter after expanding modestly in the first. 

Seasonally-adjusted exports climbed unexpectedly by 1.7% on the month while imports increased by 0.4%. 

This widened the trade surplus to €22.8 billion, data from the Federal Statistics Office showed today. 

Economists polled by Reuters had expected exports to slip by 0.8% and imports to rise by 0.9%. 

Analysts said the pick-up seen in monthly export data since the start of the year was the result of the weaker euro but added that it was still unclear how the uncertainty related to the Greek crisis would affect the economy in June. 

The German economy lost steam in the first quarter, with growth slowing to 0.3% as foreign trade dragged but it is expected to have expanded by about 0.5% between April and June. 

Economists said it was likely that foreign trade would make a contribution to second-quarter gross domestic product growth. 

Nonetheless, private consumption is expected to continue to drive growth this year as consumers benefit from high employment, wage hikes and low inflation while record-low interest rates give Germans little incentive to save. 

The trade data provided some encouragement after figures earlier this week showed industrial output stagnated in May while orders fell slightly. 

Forward-looking surveys tracking the mood among businesses, investors and consumers have taken a turn for the worse due to the Greek crisis. 

An unadjusted breakdown of trade data showed shipments to the euro zone rose by 5.1% in May compared with a year ago while Germany sent 2.3% more goods to countries outside of the European Union. 

Exports to countries within the EU that do not use the euro posted an 8.2% gain.