Within-host dynamics shape antibiotic resistance in commensal bacteria


The spread of antibiotic resistance, a major threat to human health, is poorly understood. Simple population-level models of bacterial transmission predict that above a certain rate of antibiotic consumption in a population, resistant bacteria should completely eliminate non-resistant strains, while below this threshold they should be unable to persist at all. This prediction stands at odds with empirical evidence showing that resistant and non-resistant strains coexist stably over a wide range of antibiotic consumption rates. Not knowing what drives this long-term coexistence is a barrier to developing evidence-based strategies for managing the spread of resistance. Here, we argue that competition between resistant and sensitive pathogens within individual hosts gives resistant pathogens a relative fitness benefit when they are rare, promoting coexistence between strains at the population level. To test this hypothesis, we embed mechanistically explicit within-host dynamics in a structurally neutral pathogen transmission model. Doing so allows us to reproduce patterns of resistance observed in the opportunistic pathogens Escherichia coli and Streptococcus pneumoniae across European countries and to identify factors that may shape resistance evolution in bacteria by modulating the intensity and outcomes of within-host competition.

Access options

Rent or Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Code availability

C++ code for the individual-based model is available at https://github.com/nicholasdavies/tinyhost.

Data availability

All data used in this analysis are publicly available2,3.


  1. 1.

    Goossens, H., Ferech, M., Vander Stichele, R. & Elseviers, M. Outpatient antibiotic use in Europe and association with resistance: a cross-national database study. Lancet 365, 579–587 (2005).

    PubMed  Google Scholar 

  2. 2.

    Antimicrobial Consumption Database (ESAC-Net) (European Centre for Disease Prevention and Control, 2018); http://ecdc.europa.eu/en/healthtopics/antimicrobial_resistance/esac-net-database/Pages/Antimicrobial-consumption-rates-by-country.aspx

  3. 3.

    Data from the ECDC Surveillance Atlas—Antimicrobial Resistance (European Centre for Disease Prevention and Control, 2016); https://ecdc.europa.eu/en/antimicrobial-resistance/surveillance-and-disease-data/data-ecdc

  4. 4.

    Colijn, C. et al. What is the mechanism for persistent coexistence of drug-susceptible and drug-resistant strains of Streptococcus pneumoniae? J. R. Soc. Interface 7, 905–919 (2010).

    PubMed  PubMed Central  Google Scholar 

  5. 5.

    Hardin, G. The competitive exclusion principle. Science 131, 1292–1297 (1960).

    CAS  PubMed  Google Scholar 

  6. 6.

    Cobey, S. et al. Host population structure and treatment frequency maintain balancing selection on drug resistance. J. R. Soc. Interface 14, 20170295 (2017).

    PubMed  PubMed Central  Google Scholar 

  7. 7.

    Lehtinen, S. et al. Evolution of antibiotic resistance is linked to any genetic mechanism affecting bacterial duration of carriage. Proc. Natl Acad. Sci. USA 114, 1075–1080 (2017).

    CAS  Google Scholar 

  8. 8.

    Austin, D. J., Kristinsson, K. G. & Anderson, R. M. The relationship between the volume of antimicrobial consumption in human communities and the frequency of resistance. Proc. Natl Acad. Sci. USA 96, 1152–1156 (1999).

    CAS  PubMed  PubMed Central  Google Scholar 

  9. 9.

    United Nations High-Level Meeting on Antimicrobial Resistance (World Health Organization, 2016); http://www.who.int/mediacentre/events/2016/antimicrobial-resistance/en/%5Cn http://www.who.int/antimicrobial-resistance/events/UNGA-meeting-amr-sept2016/en/

  10. 10.

    O’Neill, J. Tackling Drug-Resistant Infections Globally: Final Report and Recommendations https://amr-review.org (2016).

  11. 11.

    Kamng’ona, A. W. et al. High multiple carriage and emergence of Streptococcus pneumoniae vaccine serotype variants in Malawian children. BMC Infect. Dis. 15, 234 (2015).

    PubMed  PubMed Central  Google Scholar 

  12. 12.

    Turner, P. et al. Improved detection of nasopharyngeal cocolonization by multiple pneumococcal serotypes by use of latex agglutination or molecular serotyping by microarray. J. Clin. Microbiol. 49, 1784–1789 (2011).

    PubMed  PubMed Central  Google Scholar 

  13. 13.

    Martinez-Medina, M. et al. Molecular diversity of Escherichia coli in the human gut: new ecological evidence supporting the role of adherent-invasive E. coli (AIEC) in Crohn’s disease. Inflamm. Bowel Dis. 15, 872–882 (2009).

    PubMed  Google Scholar 

  14. 14.

    Mongkolrattanothai, K. et al. Simultaneous carriage of multiple genotypes of Staphylococcus aureus in children. J. Med. Microbiol. 60, 317–322 (2011).

    CAS  PubMed  Google Scholar 

  15. 15.

    Gordon, D. M., O’Brien, C. L. & Pavli, P. Escherichia coli diversity in the lower intestinal tract of humans. Environ. Microbiol. Rep. 7, 642–648 (2015).

    PubMed  Google Scholar 

  16. 16.

    Chaban, B. et al. Characterization of the upper respiratory tract microbiomes of patients with pandemic H1N1 influenza. PLoS ONE 8, e69559 (2013).

    CAS  PubMed  PubMed Central  Google Scholar 

  17. 17.

    Ederveen, T. H. A. et al. Haemophilus is overrepresented in the nasopharynx of infants hospitalized with RSV infection and associated with increased viral load and enhanced mucosal CXCL8 responses. Microbiome 6, 10 (2018).

    PubMed  PubMed Central  Google Scholar 

  18. 18.

    Lozupone, C. A., Stombaugh, J. I., Gordon, J. I., Jansson, J. K. & Knight, R. Diversity, stability and resilience of the human gut microbiota. Nature 489, 220–230 (2012).

    CAS  PubMed  PubMed Central  Google Scholar 

  19. 19.

    Negri, M. C., Lipsitch, M., Blázquez, J., Levin, B. R. & Baquero, F. Concentration-dependent selection of small phenotypic differences in TEM beta-lactamase-mediated antibiotic resistance. Antimicrob. Agents Chemother. 44, 2485–2491 (2000).

    CAS  PubMed  PubMed Central  Google Scholar 

  20. 20.

    Wargo, A. R., Huijben, S., de Roode, J. C., Shepherd, J. & Read, A. F. Competitive release and facilitation of drug-resistant parasites after therapeutic chemotherapy in a rodent malaria model. Proc. Natl Acad. Sci. USA 104, 19914–19919 (2007).

    CAS  PubMed  Google Scholar 

  21. 21.

    Melnyk, A. H., Wong, A. & Kassen, R. The fitness costs of antibiotic resistance mutations. Evol. Appl. 8, 273–283 (2015).

    PubMed  Google Scholar 

  22. 22.

    Smani, Y. et al. In vitro and in vivo reduced fitness and virulence in ciprofloxacin-resistant Acinetobacter baumannii. Clin. Microbiol. Infect. 18, 1–4 (2012).

    Google Scholar 

  23. 23.

    Birch, L. C. The meanings of competition. Am. Nat. 91, 5–18 (1957).

    Google Scholar 

  24. 24.

    Hastings, I. M. Complex dynamics and stability of resistance to antimalarial drugs. Parasitology 132, 615–624 (2006).

    CAS  PubMed  PubMed Central  Google Scholar 

  25. 25.

    Ayala, F. J. Competition between species: frequency dependence. Science 171, 820–824 (1971).

    CAS  PubMed  Google Scholar 

  26. 26.

    Ayala, F. J. & Campbell, C. A. Frequency-dependent selection. Annu. Rev. Ecol. Syst. 5, 115–138 (1974).

    Google Scholar 

  27. 27.

    Cobey, S. & Lipsitch, M. Niche and neutral effects of acquired immunity permit coexistence of pneumococcal serotypes. Science 335, 1376–1380 (2012).

    CAS  PubMed  PubMed Central  Google Scholar 

  28. 28.

    Lipsitch, M., Colijn, C., Cohen, T., Hanage, W. P. & Fraser, C. No coexistence for free: neutral null models for multistrain pathogens. Epidemics 1, 2–13 (2009).

    PubMed  Google Scholar 

  29. 29.

    Sinervo, B. & Lively, C. M. The rock–paper–scissors game and the evolution of alternative male strategies. Nature 380, 240–243 (1996).

    CAS  Google Scholar 

  30. 30.

    Gigord, L. D. B., Macnair, M. R. & Smithson, A. Negative frequency-dependent selection maintains a dramatic flower color polymorphism in the rewardless orchid Dactylorhiza sambucina (L.) Soò. Proc. Natl Acad. Sci. USA 98, 6253–6255 (2001).

    CAS  PubMed  Google Scholar 

  31. 31.

    Rainey, P. B. & Travisano, M. Adaptive radiation in a heterogeneous environment. Nature 394, 69–72 (1998).

    CAS  PubMed  Google Scholar 

  32. 32.

    Wale, N. et al. Resource limitation prevents the emergence of drug resistance by intensifying within-host competition.Proc. Natl Acad. Sci. USA 114, 13774–13779 (2017).

    CAS  PubMed  Google Scholar 

  33. 33.

    Lewnard, J. A. et al. Impact of antimicrobial treatment for acute otitis media on carriage dynamics of penicillin-susceptible and penicillin–non-susceptible Streptococcus pneumoniae. J. Infect. Dis. 218, 1356–1366 (2018).

    PubMed  PubMed Central  Google Scholar 

  34. 34.

    Andersson, D. I. The biological cost of mutational antibiotic resistance: any practical conclusions? Curr. Opin. Microbiol. 9, 461–465 (2006).

    CAS  PubMed  Google Scholar 

  35. 35.

    Andersson, D. I. & Hughes, D. Antibiotic resistance and its cost: is it possible to reverse resistance? Nat. Rev. Microbiol. 8, 260–271 (2010).

    CAS  PubMed  Google Scholar 

  36. 36.

    Flasche, S. et al. The impact of specific and non-specific immunity on the ecology of Streptococcus pneumoniae and the implications for vaccination. Proc. R. Soc. B 280, 20131939 (2013).

    PubMed  Google Scholar 

  37. 37.

    MacFadden, D. R., McGough, S. F., Fisman, D., Santillana, M. & Brownstein, J. S. Antibiotic resistance increases with local temperature. Nat. Clim. Change 8, 510–514 (2018).

    CAS  Google Scholar 

  38. 38.

    Dietz, K. Epidemiologic interference of virus populations. J. Math. Biol. 8, 291–300 (1979).

    CAS  PubMed  Google Scholar 

  39. 39.

    Gupta, S., Swinton, J. & Anderson, R. M. Theoretical studies of the effects of heterogeneity in the parasite population on the transmission dynamics of malaria. Proc. R. Soc. B 256, 231–238 (1994).

    CAS  PubMed  Google Scholar 

  40. 40.

    Lipsitch, M. Vaccination against colonizing bacteria with multiple serotypes. Proc. Natl Acad. Sci. USA 94, 6571–6576 (1997).

    CAS  PubMed  Google Scholar 

  41. 41.

    Blanquart, F., Lehtinen, S. & Fraser, C. An evolutionary model to predict the frequency of antibiotic resistance under seasonal antibiotic use, and an application to Streptococcus pneumoniae. Proc. R. Soc. B 284, 20170679 (2017).

    PubMed  Google Scholar 

  42. 42.

    Colijn, C. & Cohen, T. How competition governs whether moderate or aggressive treatment minimizes antibiotic resistance. eLife 4, e10559 (2015).

    PubMed  PubMed Central  Google Scholar 

  43. 43.

    Smith, E. E. et al. Genetic adaptation by Pseudomonas aeruginosa to the airways of cystic fibrosis patients. Proc. Natl Acad. Sci. USA 103, 8487–8492 (2006).

    CAS  PubMed  Google Scholar 

  44. 44.

    Yang, L. et al. Evolutionary dynamics of bacteria in a human host environment. Proc. Natl Acad. Sci. USA 108, 7481–7486 (2011).

    CAS  PubMed  Google Scholar 

  45. 45.

    Lehtinen, S. et al. Mechanisms that maintain coexistence of antibiotic sensitivity and resistance also promote high frequencies of multidrug resistance. Preprint at https://www.biorxiv.org/content/early/2017/12/14/233957 (2017).

  46. 46.

    Atkins, K. E. et al. Use of mathematical modelling to assess the impact of vaccines on antibiotic resistance.Lancet Infect. Dis. 18, e204–e213 (2018).

    PubMed  Google Scholar 

  47. 47.

    Goossens, M. C., Catry, B. & Verhaegen, J. Antimicrobial resistance to benzylpenicillin in invasive pneumococcal disease in Belgium, 2003–2010: the effect of altering clinical breakpoints. Epidemiol. Infect. 141, 490–495 (2013).

    CAS  PubMed  Google Scholar 

  48. 48.

    Ter Braak, C. A Markov chain Monte Carlo version of the genetic algorithm Differential Evolution: easy Bayesian computing for real parameter spaces. Stat. Comput. 16, 239–249 (2006).

    Google Scholar 

  49. 49.

    Bogaert, D. et al. Colonisation by Streptococcus pneumoniae and Staphylococcus aureus in healthy children. Lancet 363, 1871–1872 (2004).

    CAS  PubMed  Google Scholar 

  50. 50.

    Chewapreecha, C. et al. Dense genomic sampling identifies highways of pneumococcal recombination. Nat. Genet. 46, 305–309 (2014).

    CAS  PubMed  PubMed Central  Google Scholar 

Download references


We thank M. Davies and A. Levy for assistance and S. Lehtinen, C. Colijn and M. Lipsitch for discussion. N.G.D., M.J. and K.E.A. were funded by the National Institute for Health Research Health Protection Research Unit in Immunisation at the London School of Hygiene and Tropical Medicine in partnership with Public Health England. The views expressed are those of the authors and not necessarily those of the NHS, National Institute for Health Research, Department of Health or Public Health England. For part of this work, S.F. was supported by a Sir Henry Dale Fellowship jointly funded by the Wellcome Trust and Royal Society (grant number 208812/Z/17/Z).

Author information




N.G.D., S.F., M.J. and K.E.A. conceived the study. N.G.D. performed the analyses. N.G.D. and K.E.A. drafted the manuscript, which was revised by all authors.

Corresponding author

Correspondence to Nicholas G. Davies.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Supplementary Information

Supplementary Notes, Figures and Tables.

Reporting Summary

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Davies, N.G., Flasche, S., Jit, M. et al. Within-host dynamics shape antibiotic resistance in commensal bacteria. Nat Ecol Evol 3, 440–449 (2019). https://doi.org/10.1038/s41559-018-0786-x

Download citation

Further reading


Sign up for the Nature Briefing newsletter for a daily update on COVID-19 science.
Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing