The patients became infected during the pandemic’s early waves, testing positive for the coronavirus between March 1, 2020, and Jan. 15, 2021, the overwhelming majority before vaccines were available. Dr. Al-Aly and Dr. Mehandru noted that the experience might be different for people infected more recently. Newer virus variants might have different effects, they said, and some research suggests that vaccines can reduce the risk of various long Covid symptoms.

There are several reasons coronavirus infections may fuel long-term gastrointestinal problems. Dr. Mehandru, who has studied some possible causes, said his team and others had found that a protein the virus attaches to on some cell surfaces, called the ACE2 receptor, was abundant in the lining of the small intestine. Those receptors might provide a way for the virus to directly enter the digestive system, he said. It’s also possible that some viral fragments remained after infections resolved, keeping patients’ immune systems activated and generating inflammation-related symptoms.

Another possibility is the “gut-brain connection,” said Dr. Mehandru, explaining that “when we’re stressed we have intestinal manifestations.” And, he added, “some of the symptoms could also be because of a generalized state of being unwell or having illness outside of the intestines, which could impact how we move our bowels or mean that we feel bloated or have acid reflux.”

Dr. Al-Aly said most long Covid patients had other symptoms besides gastrointestinal problems, suggesting that the condition was “too complex to have just one mechanism that explains all of it.”

The new study did not identify whether certain previous health conditions, like diabetes or cardiovascular disease, put people at greater risk of post-Covid gastrointestinal problems. Like many other long Covid studies, it did find that people whose initial infections were severe enough to warrant intensive care or other hospitalization were more prone to long-term symptoms. Still, people with mild initial infections — who make up a majority of Covid patients — were nonetheless at greater risk than people who were not infected.

Underscoring the significance of post-Covid symptoms, the study found that long Covid patients were at greater risk of gastrointestinal problems than nearly six million people in the veterans database before the pandemic. It also found that people hospitalized with a coronavirus infection were more likely to develop long-term gastrointestinal issues than people hospitalized with the flu.