The German economy has been relying on private consumption and construction for growth, a cycle supported by a solid labour market, record-low interest rates and rising wages. Nonetheless, economic output is expected to shrink in the second quarter.
In a sign that the economy ended the April-June period on a stronger footing, retail sales were up by 3.5% on the month in real terms after a revised 1.7% drop the previous month, data from the Federal Statistics Office showed.
This was the highest monthly increase since December 2006 and easily beat a Reuters forecast of 0.5%.
On the year, retail sales fell by 1.6% in June after a revised 3.8% rise in the previous month, the data showed. Retail sales are a volatile indicator often subject to revision.
In the first half of the year, retail sales rose by 2.2% on the year in real terms and by 2.9% in nominal terms, the data showed. The rise was driven by sharp gains in online retailing.
The retail data comes after a survey published on Tuesday showed German consumer morale worsened for the third month in a row heading into August as a global economic downturn, trade disputes and Brexit uncertainty fuel workers' fears of losing their jobs and their income.