ARTHUR, N.D. — This is harvest season in the rich farmlands of the eastern Dakotas, the time of year Kevin Karel checks his computer first thing in the morning to see how many of his soybeans Chinese companies have purchased while he was sleeping.

Farmers here in Cass County have prospered over the last two decades by growing more soybeans than any other county in the United States, and by shipping most of those beans across the Pacific Ocean to feed Chinese pigs and chickens.

But this year, the Chinese have all but stopped buying. The largest market for one of America’s largest exports has shut its doors. The Chinese government imposed a tariff on American soybeans in response to the Trump administration’s tariffs on Chinese goods. The latest federal data, through mid-October, shows American soybean sales to China have declined by 94 percent from last year’s harvest.

Image Kevin Karel, the general manager of the Arthur Companies, which has long sold soybeans to China. With that market now largely shut off, Mr. Karel said his firm has started to stockpile soybeans. Credit... Dan Koeck for The New York Times

Mr. Karel, the general manager of the Arthur Companies, which operates six grain elevators in eastern North Dakota, has started to pile one million bushels of soybeans on a clear patch of ground behind some of his grain silos. The big mound of yellowish-white beans, already one of the taller hills in this flat part of the world, will then be covered with tarps.