London (CNN Business) Chinese shoppers bought fewer cars last year as trade tensions and a weaker economy contributed to the first annual sales decline in two decades.

The China Passenger Car Association said Wednesday that vehicle sales fell 5.8% in 2018 to 22.4 million vehicles. It's the first annual decline in nearly 20 years, according to state broadcaster CCTV.

China is the world's biggest car market, and many global automakers have come to depend on blockbuster sales fueled by Chinese consumers who purchased vehicles as they joined the middle class.

But the market became much tougher last year because of a sharp slowdown in China's economy. Growth in 2018 is set to be the weakest since 1990, and 2019 looks even worse.

The world's second largest economy is feeling the effects of government attempts to rein in risky lending after a rapid rise in debt levels. Trade tensions with the United States have only made matters worse.