SEATTLE — Amazon may dominate online shopping in the United States, but in the world’s second-largest economy it is all but calling it quits.

Amazon said late Wednesday that it was closing its domestic e-commerce business in China. The company had long struggled to gain traction in China despite operating there for more than a decade.

Instead of buying products sold locally by Amazon and its marketplace of Chinese suppliers, shoppers at Amazon.cn will be able to buy only some products imported by Amazon’s sites in the United States, Britain, Germany or Japan.

Amazon’s Chinese sales are small enough that the company does not break them out in its financial reports. It sells less in the country than in Japan, the smallest market that it does report, which had $13.8 billion in sales last year, about 6 percent of Amazon’s business globally.