Scientists suspect that one culprit behind your new illness might be the infection you got a couple of years ago.

The link between new health problems and your past health history appears to be particularly prevalent with Covid. A new Nature Medicine study found that health problems stemming from even mild Covid infections can emerge as many as three years afterward. The study found a greater risk three years later of problems in the gut, brain and lungs, including irritable bowel syndrome, mini-strokes and pulmonary scarring.

This is different from what most people think of as “ long Covid ,” the debilitating chronic condition that can include fatigue , brain fog and racing heartbeat . Instead, the latest study has found an increased risk of new health conditions—things you probably wouldn’t think of as related to a prior illness—developing years later.

This connection extends to other illnesses, too, doctors say.

There’s some evidence of increased cases of Parkinson’s disease following the 1918 flu pandemic . More recent research has linked the Epstein-Barr virus , which causes mono, to multiple sclerosis years or even decades later. Common illnesses like flu can have aftereffects, too.

“Infections may be setting up things down the road that we’re not aware of,” says Dr. Monica Verduzco-Gutierrez, professor and chair of the department of rehabilitation medicine at the University of Texas Health Science Center at San Antonio and director of its Covid recovery clinic.

The science is still emerging. It’s hard to know for sure whether an old illness is causing your new problem, so for now there are no hard and fast guidelines for patients.

What’s behind the new problems

The latest Covid study didn’t identify a cause of later health problems, and scientists say there’s probably more than one. But one culprit is likely inflammation, doctors say.

Infections can trigger inflammation, the body’s natural response to fight off disease. Sometimes inflammation doesn’t subside and becomes chronic, which can create problems that lead to conditions like dementia and neurological disease.

Researchers analyzed millions of records from the Veterans Affairs health system from the first year of the pandemic, before the wide rollout of Covid vaccines and antivirals. Researchers compared more than 114,000 veterans who got mild Covid with a control group of more than five million veterans who didn’t have Covid.

People with mild Covid were 8% more likely to have a GI problem than the control group three years later. They were 10% more likely to have a neurological problem, and 22% more likely to have a pulmonary issue.

“What we’re learning with Covid is that acute infections can have long-term effects that don’t have to emerge in the first year or the second year,” says Dr. Ziyad Al-Aly, chief of research and development at the VA St. Louis Health Care System and a clinical epidemiologist at Washington University in St. Louis who was the lead author on the study.

The increased risk three years out is relatively small for any given person, and is significantly smaller than the risk of related health problems in the first year after infection. But the scale of the pandemic means that a lot of people might be affected, notes Al-Aly.

The study also looked at more than 20,000 veterans who were hospitalized for Covid in 2020. This group with more severe cases faced greater risks of later health problems than those with mild Covid did. Three years after infection, their increased risk of developing a GI issue was 52%. It was 21% higher for a neurological issue and 57% greater for a pulmonary problem, according to the study.

One caveat: The study looked at people who got the first strain of Covid in 2020. The virus has evolved since then, and different versions might have different effects, noted Al-Aly.

In some good news, the latest research found that for some health problems, the increased risks subside by year three. Previous VA research had found an increased risk of Type 2 diabetes and certain autoimmune conditions in the first year or two after a Covid infection. This latest study found that by the third year, the risk for those conditions was no greater than the risk faced by the control group, says Al-Aly.

What other viruses do

It’s not entirely clear why and how Covid infections might be triggering these later health problems. However, it isn’t unusual for a virus to leave an imprint long after an infection is cleared, says Dr. Graham Snyder, medical director of infection prevention and hospital epidemiology at the University of Pittsburgh Medical Center.

Some viruses, like HIV, result in chronic infections with ongoing complications. Others, like many of the herpes viruses, appear to be under control after an initial infection but remain latent and can re-emerge.

There are also viruses that can cause cellular changes and leave people at a greater risk of developing certain types of cancer, like the HPV viruses . The virus that causes Covid falls into a different and less well-known category, he says. These are viruses that trigger a cascade of immune-system changes.

However, Covid seems to disrupt the immune system and cause more immune dysregulation and inflammation than similar viruses, like influenza, says Snyder. He doesn’t think there’s a precedent for a virus to cause the variety and extent of long-term problems that Covid appears to .

“This is unique,” he says. “Covid is unique.”

Write to Sumathi Reddy at Sumathi.Reddy@wsj.com