According to a flash estimate by the federal statistics office Destatis, Germany's gross domestic product (GDP) shrank by 0.2 percent in the period from April to June, following growth of 0.7 percent in the preceding three months.
Analysts had been forecasting zero growth or even a minimal contraction in the second quarter after the unusually mild winter boosted activity in the first three months of the year, notably in areas such as construction.
Thanks to the mild weather, construction investment that would normally have been made later in the year was brought forward.
Exports were also weak, not climbing as strongly as imports, with the result that the net contribution of foreign trade to GDP growth was negative in the second quarter, Destatis said.
Using a 12-month comparison, the German economy lost steam in the April-June period, with GDP expanding by 0.8 percent compared with a year earlier, Destatis said.