Exports fell by 6.3% on the previous month, data from the federal statistics office showed on Thursday.

Analysts polled by Reuters had predicted a decline of 3.3%.

Imports fell by 6.1%. Imports had been forecast to drop by 0.8%.

In 2022 as a whole, exports were up by 14.3% from the previous year after calendar and seasonal adjustments. Imports rose much more strongly, by 24.3%, driven by increased energy prices due to the war in Ukraine.

As a result, Germany's export surplus declined for the fifth consecutive year in 2022, the statistics office said.

Most German exports went to the United States in December 2022, with goods exports down 10.0% on November 2022 after seasonal and calendar adjustment.

Most imports came from China in December, with 13.5 billion euros in goods from there.

The statistics office publishes a detailed report with more economic data.

($1 = 0.9085 euros)

(Reporting by Friederike Heine and Miranda Murray. Writing by Maria Martinez. Editing by Rachel More)