Grocery bills in China were already climbing in recent months as an epidemic of swine fever ravaged the nation’s hog population. Rising consumer prices played a role in the protests that culminated in the 1989 Tiananmen Square massacre, and the government has worried about inflation ever since.

Hence Beijing’s herculean efforts to keep food moving as the coronavirus brings parts of China’s economy to a near halt.

The Ministry of Agriculture has ordered the farm industry to increase output “by every possible means” while keeping prices “basically stable.” The authorities have made a show of punishing stores that gouge consumers — one supermarket was fined $70,000 for selling cabbage at $9 a head, according to official news media.

Two state-run food giants have been ordered to ramp up supplies of rice, flour, cooking oil and meat to Wuhan and Hubei Province, where the city is situated. The city of Tianjin announced recently that Kang Shi Fu, a giant maker of instant noodles, had increased production to four million noodle packets a day.

In a news conference on Monday, national officials said they had coordinated with six provinces near Hubei to amass a reserve of 60,000 tons of vegetables. They also said they had readied 10,000 tons of frozen pork near Shanghai’s port that could be sent to Wuhan anytime.

Still, China’s ability to continue feeding itself during the coronavirus will depend in large part on how well it controls the spread of the virus. It will also take more than a little good luck.

Wang Zhigang, a manager at one of Shouguang’s main wholesale produce markets, said that as long as the virus was kept away and the city could keep shipments moving, China’s vegetable supplies should remain ample.