Prescription Drugs

(© JJAVA – stock.adobe.com)

In A Nutshell

Researchers studied 2,509 Estonians and found 42% of tested drugs left microbiome changes lasting over a year.

Beta-blockers, antidepressants, benzodiazepines, and PPIs showed long-term effects comparable in scope to antibiotics.

The more prescriptions filled in the past, the stronger the gut impact, suggesting additive, lasting influence.

Accounting for past medication use is crucial when linking gut bacteria to disease risk.

TARTU, Estonia — Medications prescribed years ago may still be influencing the bacteria living in your gut today, according to new research that challenges the assumption that drug effects end when treatment stops.

Analyzing gut bacteria samples from 2,509 people in Estonia, researchers discovered that various medications continue to leave detectable fingerprints on the microbiome long after someone has stopped taking them. Beta-blockers, antidepressants, proton pump inhibitors, and benzodiazepines all left effects that lasted for years, with some changes visible three or more years after last use.

The gut microbiome, which is the collection of trillions of bacteria in the digestive system, influences digestion, immunity, and overall health. Changes to this ecosystem can affect everything from nutrient absorption to susceptibility to infections.

Tracking Medication History Through Electronic Health Records

The research team from the University of Tartu in Estonia took advantage of something most microbiome studies lack: detailed electronic health records showing exactly when people filled prescriptions over a five-year period. Looking backward in time, they could see whether medications used years earlier were still associated with changes in gut bacteria composition.

They compared people who had last used certain drugs more than one, two, three, or even four years before providing stool samples with people who hadn’t used those drugs at all in the preceding five years. The differences, while modest in size, were consistent across drug classes.

Out of 186 medications analyzed, 167 were associated with changes in the gut microbiome when actively used. But 78 of them—roughly 42 percent—displayed what researchers call “carryover effects” that lasted well beyond the treatment period.

Gut health: Intestines sketch with gut bacteriaPrescription drugs can be problematic for the gut microbiome even years after you stop taking them. (© T. L. Furrer – stock.adobe.com)

Beta-Blockers And Anxiety Medications Leave Lasting Marks On The Microbiome

While antibiotics left the expected long-term effects, medications targeting human biology rather than bacteria left surprisingly durable impacts as well.

Beta-blockers, commonly prescribed for high blood pressure and heart conditions, were associated with gut bacteria changes detectable even when people had stopped taking them several years earlier. The same held true for benzodiazepine derivatives like Xanax and Valium, which are used to treat anxiety and sleep disorders.

Antidepressants, particularly selective serotonin reuptake inhibitors, also demonstrated carryover effects. So did proton pump inhibitors, the medications millions take for acid reflux and heartburn.

In some cases, the more prescriptions someone had filled in the past, the stronger the effect on their current microbiome. The “additive” pattern suggests that medication history compounds over time rather than simply washing away after treatment ends.

Anxiety Drugs Rival Antibiotics In Gut Health Impacts

Benzodiazepines stood out in the analysis. These anti-anxiety medications had effects on gut bacteria composition that rivaled those of broad-spectrum antibiotics. Different drugs in this class had varying impacts, with alprazolam exerting a broader effect than diazepam, even though both treat similar conditions.

The study also revealed differences among medications in the same class. Among beta-blockers, metoprolol was associated with much stronger microbiome changes than nebivolol. Among proton pump inhibitors, omeprazole demonstrated different patterns than pantoprazole or esomeprazole.

These variations matter for clinical practice. If two medications treat the same condition but one has a more dramatic effect on gut bacteria, that information could eventually influence prescribing decisions.

Benzodiazepines pills in RX prescription drug bottleBenzodiazepines are just as rough on gut bacteria as antibiotics, the study suggests. (© luchschenF – stock.adobe.com)

Which Bacterial Species Are Most Affected

Specific bacterial species followed consistent patterns across multiple drug classes. Several members of the Clostridiales order increased in abundance among people taking beta-blockers, macrolide antibiotics, biguanides like metformin, and proton pump inhibitors.

Proton pump inhibitors were linked to increases in oral bacteria like Streptococcus parasanguinis and Veillonella parvula, species that normally reside in the mouth but can colonize the gut when stomach acid is reduced. The finding aligns with previous research and helps explain why PPIs can sometimes lead to gut infections.

Many of the medications studied were negatively correlated with overall bacterial diversity in the gut. People taking more unique medications at the time of sampling tended to have lower microbial richness, meaning fewer different species of bacteria.

Before-and-After Evidence Supporting Causal Links

To confirm their findings, researchers analyzed a subset of 328 people who provided stool samples twice, about four years apart. Watching what happened when people started or stopped taking medications between the two time points provided clearer evidence.

When people began taking penicillins, macrolides, proton pump inhibitors, benzodiazepines, or glucocorticoids, their gut bacteria changed in predictable ways. When they discontinued medications, the bacterial changes moved in the opposite direction, supporting a likely causal relationship between drug use and microbiome alterations.

These before-and-after comparisons provide stronger evidence than simply observing differences between people taking and not taking medications at a single point in time.

Why This Matters For Gut Health Research

The study has immediate consequences for microbiome research. Scientists trying to understand links between gut bacteria and diseases need to account not just for current medication use, but for prescriptions filled months or years earlier. Otherwise, they risk confusing medication effects with disease effects.

The researchers demonstrated this problem by revealing that several disease-microbiome associations were actually confounded by long-term drug usage. When past medication history was properly accounted for, some apparent disease signals disappeared.

For clinical medicine, the findings raise questions about cumulative effects of medications taken over time. If drugs leave lasting marks on the microbiome, and if the microbiome influences health, then medication decisions today could have consequences that extend far beyond the treatment period.

The research also suggests that gut bacteria might not fully recover after antibiotic courses. People who had used antibiotics years earlier still had lower bacterial diversity than people who had avoided antibiotics entirely during the five-year observation window. Time since last antibiotic treatment didn’t seem to bring diversity levels back to baseline.

Study participants who used prescription medications took an average of about three different drugs from diverse classes at the time of sample collection. During the five-year observation period, they had used more than 500 different medications at the most specific classification level.

When someone takes multiple medications, their combined effects on the microbiome might be additive or even synergistic. Past drug usage explained slightly more variance in microbiome composition than current drug usage, suggesting that accumulated medication history matters at least as much as what someone is taking right now.

While the study was conducted in Estonia, the medications analyzed are used worldwide. Beta-blockers, antidepressants, proton pump inhibitors, and benzodiazepines rank among the most commonly prescribed drugs in the United States and many other countries.

The research doesn’t suggest people should stop taking prescribed medications. These drugs treat serious medical conditions, and the health benefits generally outweigh potential microbiome disruptions. However, the findings do suggest that medication effects are more layered and longer-lasting than previously recognized.

Future research will need to determine whether these microbiome changes have functional consequences for health and whether there are ways to minimize long-term impacts while maintaining therapeutic benefits.

Disclaimer: This article summarizes peer-reviewed research and is intended for general informational purposes only. It should not replace professional medical advice. Always consult a qualified healthcare provider before making medication or treatment changes.

Paper Summary

Methodology

The study analyzed shotgun metagenomic sequencing data from 2,509 participants in the Estonian Microbiome Cohort, ages 23 to 89. Researchers linked microbiome data with electronic health records from the Estonian Health Insurance Fund and major hospitals, tracking medication purchases over five years before stool sample collection. A subset of 328 participants provided a second sample after approximately four years, allowing analysis of medication initiation and discontinuation effects. The team used multiple statistical approaches to identify drug-microbiome associations while controlling for age, gender, and body mass index. They conducted rigorous deconfounding analyses to separate medication effects from disease effects, lifestyle factors, and other drug usage. Medications used by at least 20 people at sampling were included, resulting in analysis of 186 different drug classes and specific medications.

Results

Of 186 medications analyzed, 167 (89.8%) were associated with changes in gut microbiome composition, bacterial diversity, or abundance of specific species. Seventy-eight medications (41.9%) exhibited carryover effects detectable more than one year after last use. Broad-spectrum antibiotics like macrolides and penicillins left enduring effects, as did beta-blockers, benzodiazepine derivatives, antidepressants, proton pump inhibitors, and biguanides. Some associations were detectable more than three years after last medication use. Active medication use was associated with reduced bacterial diversity for many drug classes. Beta-blockers, macrolides, and benzodiazepine derivatives were negatively correlated with species richness and Shannon diversity index. Specific bacterial species followed consistent patterns across multiple drug classes, suggesting common mechanisms of action. The analysis of participants with samples from two time points confirmed findings. People who started taking penicillins, macrolides, proton pump inhibitors, benzodiazepines, or glucocorticoids between sampling periods developed predicted microbiome changes. Those who discontinued medications experienced opposite changes, supporting causal relationships.

Limitations

The study used prescription data rather than direct observation of medication consumption, so researchers assumed people took medications they purchased. Sample sizes for analyzing specific medications were limited, though adequate for broader drug classes. The cohort was predominantly Estonian and female (70.3%), which may limit generalizability. Transportation time between stool collection and freezing varied and was associated with beta diversity at the second time point. The study used relative abundance data rather than absolute quantification, which may not always reflect biologically relevant changes. Analysis focused on prescription medications and did not capture over-the-counter drugs.

Funding and Disclosures

The study was funded by Estonian Research Council grant PRG1414, EMBO Installation grant 3573, Biocodex Microbiota Foundation, and Estonian Center of Genomics/Roadmap II project 16-0125. The authors declared no conflicts of interest.

Publication Details

Aasmets O, Taba N, Krigul KL, Andreson R, Estonian Biobank Research Team, Org E. A hidden confounder for microbiome studies: medications used years before sample collection. mSystems. Published online September 5, 2025. doi:10.1128/msystems.00541-25