German exports unexpectedly fell in July, ending a run of monthly increases since February, as shipments to European Union countries declined. 

Exports fell by 0.8% in July compared with the previous month, data from the federal statistics office showed on Tuesday. Exports to EU countries dropped by 1.6%, while exports to non-EU countries increased by 0.2% on the month. 

The median expectation of economists polled by Reuters was for a 0.1% increase.

Imports dropped by 5.7% on the month, meaning the trade surplus grew to €21.3 billion ($24.8 billion) in July from €15.4 billion in June. 

The trade numbers - and separate data from France showing a widening French trade deficit in June - were in sharp contrast to new figures showing a 25% surge in Chinese exports year-on-year in August on the back of high-tech and AI-related products.

($1 = 0.8598 euros)

(Reporting by Maria Rugamer in Gdansk and Maria Martinez in Berlin;Editing by Ludwig Burger)