The German economy's surprise second-quarter contraction was probably due to Russian sanctions and confidence being eroded by the Ukraine crisis.

The finance ministry also said the drop is as a result of the comparison with a bumper first quarter.

Europe's largest economy shrank by 0.2% between April and June after growing 0.7% in the first quarter thanks largely to an unusually mild winter, which had boosted construction activity at the beginning of the year. 

"The decline in gross domestic product (GDP) goes beyond the expected counter-effect to the very strong weather-related performance in the previous quarter," the finance ministry said in its monthly report. 

"This is likely to have been related to the effect of sanctions and negative effects on confidence due to the Ukraine crisis," it said.

After Moscow annexed Crimea in March, Western nations targeted Russian President Vladimir Putin's closest allies and businessmen with sanctions and in late July expanded them to include the energy, banking and defence sectors. Russia has reacted with restrictions on imports of Western products. 

The finance ministry said the uncertainty over the Ukraine crisis was likely to have contributed to the dampening of industrial activity in the second quarter. 

"If the Ukraine crisis does not escalate further and no further serious stages of sanctions are imposed, it is to be expected that the current economic slowdown is only temporary," the ministry said, noting that if this was the case, investment was likely to pick up in the remainder of the year. 

It said "other geopolitical tensions" and "weaker economic development in the euro zone" had also contributed to the contraction, but the general economic trend remained positive.

The statistics office said last week that investment in construction and foreign trade had weighed on growth in the second quarter. 

However, the German government is sticking to its forecast that the German economy would grow by 1.8% this year even after its disappointing second quarter. 

The finance ministry said today that exports, which have traditionally propelled growth in Germany but have struggled this year and last, were likely to develop modestly in the rest of the year as the global economy gradually recovers.

Despite the economic slump in the second quarter, tax revenues rose by 3.3% to €45.4 billion in July compared with July last year as Germany's high employment level boosted income and sales tax revenues.