(Bloomberg) -- Germany’s trade deficit with China shrank for the first time since 2018 — helping to more than double the country’s overall surplus. 

The gap with the Asian nation narrowed to €58.4 billion ($63 billion) last year, down from a high of €86 billion in 2022, data published Monday by Germany’s statistics office showed.

Even so, that’s still the second-strongest reading on record and was primarily due to a plunge of more than 19% in Chinese imports as exports declined at about half that pace. 

The lopsided relationship remains an issue for Europe’s largest economy and the government in Berlin is well aware. Last Friday, it set up a state fund endowed with €1 billion to invest in mining projects outside of China. That move is aimed to reduce dependence on critical raw materials necessary for future technologies like batteries, semiconductors or green energy. 

“We are still on a scale that gives us a stomach ache because it’s very unusual to have such a huge trade deficit with a single country,” said Juergen Matthes, who heads global and regional markets at IW. He reckons that about 10% of the drop in imports is down to base effects connected to an unusually large order in chemical products in 2022. 

China’s catch-up in mechanical engineering and in the automobile sector adds to worries. Its electric vehicle maker, BYD, which overtook Tesla’s car sales in the fourth quarter, has announced efforts to become the biggest seller in Europe. 

There are shifts playing out within the country, too. 

“We are hearing from many companies that they increasingly want to produce in China for China, also as a result of geopolitical risks,” Matthes said before the data were published.

“Chinese customers’ demand will thus increasingly be met by production of German firms in China instead of exports from Germany,” he said. “That comes at the expense of the German economy while China will ultimately benefit from such a change in business strategies.”

Overall numbers Monday showed that Germany’s 2023 trade surplus jumped to €209.4 billion as a 10% fall in imports more than compensated for a 2% decline in exports.

©2024 Bloomberg L.P.