Many commonly prescribed medications may leave long-lasting changes in the bacteria that live in the gut, according to new research.

Researchers examined stool samples from more than 2,500 people in the Estonian Biobank, alongside their prescription records and data from participants in the Estonian Microbiome cohort. Their goal was to determine whether medication use was linked to differences in the gut microbiome, the community of bacteria and other microorganisms that lives in the digestive tract.

The researchers found that most of the medications they studied were associated with differences in the gut microbiome. Notably, for many drugs, these differences could still be detected years after a person had stopped taking the medication.

Read More on Health

The long-lasting associations were not limited to antibiotics, which are already known to affect gut bacteria. Similar links were observed for antidepressants, beta-blockers, proton pump inhibitors (PPIs), and benzodiazepines. Each of these categories of medication was connected to its own distinctive microbial “fingerprint” in the gut.

Dr. Oliver Aasmets, lead author of the study, said: “Most microbiome studies only consider current medications, but our results show that past drug use can be just as important as it is a surprisingly strong factor in explaining individual microbiome differences.”

The results could have implications for future microbiome research. If medications taken months or years earlier continue to influence the gut microbiome, researchers studying links between the microbiome and disease may need to take a person’s medication history into account.

A stock image shows a woman with a bottle of pills, suffering from abdominal pain.

Dr. Lucy Hooper, a GP and co-founder of Coyne Medical in London, told Newsweek that certain groups may be more vulnerable to long-lasting microbiome changes than others. Babies and young children are still developing their gut microbiome, meaning disruptions during this period could have a greater impact. She noted that research has previously linked early antibiotic use and microbiome changes in children to conditions including asthma, obesity and type 2 diabetes.

Hooper added that older adults may also be at increased risk because microbiome diversity tends to decline with age, while many are more likely to require frequent or long-term medication use.

Benzodiazepines Stand Out in the Findings

One of the most striking findings involved benzodiazepines, a class of drugs commonly prescribed for anxiety and other disorders. The researchers reported that the association between benzodiazepine use and changes in the gut microbiome was comparable to the associations seen with broad-spectrum antibiotics, which are designed to act against many different kinds of bacteria and are known to cause substantial changes in gut microbes.

The study also showed that medications within the same drug class do not necessarily affect the microbiome in the same way. For example, diazepam and alprazolam, two benzodiazepines that may be prescribed for similar conditions, appeared to differ in how strongly they disrupted gut microbes.

The authors said this finding is important because microbiome studies often group medications within the same class together. Their results suggest that individual drugs may need to be considered separately when examining their effects on the microbiome.

Researchers also analyzed follow-up stool samples from a smaller group of participants. This allowed them to observe what happened when people started or stopped taking certain medications. They found predictable shifts in gut microbes over time, providing evidence that the medications themselves may be responsible for at least some of the microbiome differences observed.

Although the follow-up group was relatively small, the researchers confirmed persistent effects linked to proton pump inhibitors, selective serotonin reuptake inhibitors (SSRIs), and certain antibiotics, including combination penicillins and macrolides.

Lifestyle factors may also influence how well the microbiome recovers after medication use, according to Hooper. She said people who consume low amounts of dietary fiber typically have a less resilient microbiome, which could make recovery more difficult after disruptions.

Why Past Medication Use Matters

Overall, the study suggests that a person’s gut microbiome may reflect more than their current diet, lifestyle, health, and present medication use. It may also contain detectable traces of medications taken in the past.

The researchers argue that both scientists and clinicians should consider medication history when interpreting microbiome data. Some microbiome changes that appear to be related to disease, they suggest, could instead be linked to medications that were taken months or even years earlier.

Hooper said additional research is needed to determine whether medication-related microbiome changes directly cause health effects. “We have lots of studies showing correlation or patterns. But fewer studies show ‘causation.’ We need to track microbiome changes in more people over time to determine the true impact of medication.”

She also emphasized that people should not stop taking prescribed medications because of concerns about their microbiome. “No one should stop medication because they are worried about their microbiome, but it is always sensible to regularly review medicines.”

Reference

Oliver Aasmets, et al. A hidden confounder for microbiome studies: medications used years before sample collection. mSystems, 2025; 10 (10) DOI: 10.1128/msystems.00541-25