German industrial production fell more than expected in July, official data showed Friday, as the country's flagship auto industry registered a sharp drop.

Output declined 2.4 percent month-on-month, according to federal statistics agency Destatis, after a revised increase of 1.7 percent in June.

Analysts surveyed by the financial data firm FactSet had expected a more modest drop in output of 0.5 percent in July.

Production declined in "most sectors", Destatis said, but an 8.1-percent fall in the automotive industry had a "particularly negative impact".

The move wiped out a 7.9-percent increase in production in the sector in June.

The electrical equipment sector also saw production fall particularly sharply in July by seven percent, Destatis said.

German exports meanwhile rose to 130 billion euros ($144.5 billion) in July, up 1.7 percent on the previous month, Destatis figures also published Friday showed.

The increase ended a streak of two months in which exports had dropped.

Exports to the European Union rose on a calendar-adjusted basis by 3.3 percent, while those to non-EU countries declined by 0.2 percent.

Germany imported goods in a value of 113.2 billion euros in July, up 5.4 percent on the previous month.

"Today's data is a cold shower for everyone hoping for a speedy recovery" in Germany, said ING analyst Carsten Brzeski.

In Europe's largest economy, "the risk of yet another quarter of stagnation or even contraction has clearly increased", Brzeski said.