Figures
Abstract
Temperate phages that incorporate into their bacterial hosts’ genomes often encode defense systems that protect their hosts from superinfection by unrelated phages. Yet the evolutionary value of such defenses to the phage remains unclear. We present a minimal theoretical framework to quantify the selective advantage of a prophage-borne defense system in competition between temperate phages infecting the same bacterial host. The model reveals regimes in which a “defensive phage” can invade and persist despite growth costs, regimes of bistability, and others in which all phage types coexist due to a rock–paper–scissors-like dynamic between defensive, non-defensive, and defense-loss variants. Because defense systems can be non-transitive, true rock-paper-scissors relations can lead to persistent oscillations. These results identify simple conditions under which phage-encoded defense systems are evolutionarily stable, providing testable predictions for the prevalence and maintenance of these systems in natural microbial communities.
Author summary
Bacteria are susceptible to their own viruses, called bacteriophages or simply phages. Temperate phages are able to integrate their DNA into bacterial genomes and persist as “prophages.” Surprisingly, many prophages encode defense systems that protect their bacterial host from infection by other phages. While such defenses are widespread in microbial genomes, it is not obvious why they benefit the prophage itself – especially because defense systems typically slow host growth or carry other costs. We developed a simple mathematical model to ask when a prophage-borne defense system is favored during competition between temperate phages infecting the same bacterial species. By focusing on long-term population dynamics, we identify conditions under which a “defensive” prophage can invade and persist, even if it reduces host growth by as much as 20%. If defense systems can be lost by mutation, a striking outcome emerges: defensive and non-defensive variants can stably coexist through a rock–paper–scissors-like interaction. Our results provide a quantitative framework for understanding why phage-encoded defense systems are so common in nature – they show that even costly defenses can be evolutionarily stable when phages frequently compete for the same hosts.
Citation: Meir Y, Wingreen NS (2026) The value of a prophage-borne defense system in phage–phage competition. PLoS Comput Biol 22(9): e1014739. https://doi.org/10.1371/journal.pcbi.1014739
Editor: Boyang Ji, BioInnovation Institute, DENMARK
Received: March 5, 2026; Accepted: August 19, 2026; Published: September 8, 2026
Copyright: © 2026 Meir, Wingreen. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: The minimal data set and accompanying code, where generated, is available at Zenodo via https://doi.org/10.5281/zenodo.20438206.
Funding: The work was supported by grant number DAF2024-342781 from the Chan Zuckerberg Initiative DAF, an advised fund of Silicon Valley Community Foundation (to NSW), and by the National Institute of General Medical Sciences (NIGMS) of the National Institutes of Health under award number R35GM122575 (to NSW). The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.
Introduction
Temperate bacteriophages frequently encode defense systems that protect their bacterial hosts from infection by other phages, thereby indirectly promoting the persistence and transmission of the prophage itself [1–5]. These prophage-borne defenses span diverse molecular strategies and act at multiple stages of the infection cycle, from blocking adsorption or genome injection (classic superinfection exclusion) to targeting intracellular phage replication, transcription, or virion assembly [1,6]. Defenses may directly counter infection or, instead, activate abortive infection in which the prophage sacrifices the infected cell to prevent productive replication of the invader [3,5]. The range of such phage-borne defenses can be broad – systematic studies in multiple species showed that defenses can provide resistance to diverse incoming phages [1,2,5].
However, prophage-borne defenses are not free. Costs can arise from direct expression burdens, interference with core cellular processes, and tradeoffs associated with altered surface structures (e.g., transporters, pili, flagella, receptors) that reduce nutrient uptake or motility [1,7]. Some defense systems impose intrinsic risks of self-damage: restriction-modification systems can cause stochastic “autoimmunity” via self-restriction, triggering DNA damage responses and reducing fitness [8]. CRISPR-Cas immunity can likewise carry costs through maintenance and expression burdens and due to self-targeting spacers [9].
How large a cost can a defense system carry and still provide a net benefit to the prophage? Here, we present a simple theoretical framework that quantifies the selective value of a prophage-borne defense system in the specific context of competition between temperate phages infecting the same bacterial host. Bacteria–phage population dynamics have long been modeled using resource-explicit predator–prey or chemostat frameworks, including the classic work of Levin, Stewart, and Chao on lytic phages [10] and a later extension to study the advantages of lysogeny [11]. While works such as these have established a mathematical framework, a challenge in modeling competition among temperate phages is that spontaneous induction of prophages typically occurs at rates orders of magnitude slower than bacterial growth or phage-induced lysis. However, in environments where the timescale of phage adsorption is short compared to other relevant timescales such as bacterial division or lytic delay, it is mathematically consistent to assume newly released virions instantly find new hosts, obviating the need to track free phage populations. By assuming this separation of timescales, we are able to efficiently model interactions among lysogens over many rounds of induction. This simplified approach is particularly appropriate for modeling the evolutionary stability of phage-borne defense systems, as it focuses on the long-term dynamics that emerge from the trade-offs between prophage-borne protection and its costs. Our model reveals parameter regimes under which defense systems are predicted to be stably maintained, thereby offering predictions for the prevalence of these systems in natural bacterial populations.
Results
Carrying a defense-system has competitive value to a prophage
To quantify the value of a phage-borne defense system in phage-phage competition, we consider a competition between two temperate phages that predate on the same bacterial host, with the main processes shown schematically in Fig 1A and 1B. One of the phages carries a defense system that makes its lysogens immune to infection by the other phage. (Phages of each type are assumed to be immune to superinfection by the same type.) To focus on the role of the defense system, we make several simplifying assumptions: (1) We consider a chemostat-like setting with a steady supply rate of susceptible bacteria, and a constant dilution (loss) rate of all constituents. (2) We do not track free phage particles, instead assuming that these rapidly find bacterial targets. To our knowledge, this useful approximation for modeling lysogen population dynamics is new to the field. (3) We do not explicitly simulate nutrients, but rather assume a fixed overall carrying capacity for bacteria. With these assumptions, the non-dimensionalized dynamical equations for the system are (the full set of dimensional equations is detailed in Materials and Methods, subsection M1):
with , where the populations of the various strains are B for susceptible bacteria, L1, for the lysogen without a defense system, L2, for the lysogen with a defense system, and L12, for the double lysogen. The first term on the right-hand side of Eq. 1 describes the influx of susceptible bacteria at a constant source rate S. The second term in (1), along with the first terms in (2–4), describes the replicative growth of the susceptible bacteria and the different lysogens up to a carrying capacity, defined as unity (which sets the scale for the populations). Here we assume that the growth rate of
is the same as that of the susceptible bacteria [1], while only
and
have reduced growth rates
due to the cost of the defense system (we also tested an intermediate lower growth rate for the defenseless lysogen
, which did not lead to any qualitative changes in the results). The next terms describe decreases in the populations due to dilution and death at a rate
. The last terms in Eqs. (2)–(4) describe induction at a rate k. The 3rd terms in (2) and (3) describe the increase in the lysogen population due to induction, with burst size b, immediately followed by infection of susceptible bacteria, while the 4th term in (1) describes the corresponding decrease in the susceptible bacteria population. Lastly, the 4th term in (2) and the 3rd term in (4) describe the conversion of
to
due to induction plus infection by either
or
. The inverse process is not allowed due to the defense system of
. Later, we also consider an alternative case in which the defense system is abortive, namely
dies when invaded by
. For simplicity, we assume, here and in the following that when a double lysogen induces equal numbers of the two prophage particles are produced.
(A,B) Schematics of model elements: (A) Each lysogen (,
, and the double lysogen
) induces at a constant, low rate k (left), with the
lysogen releasing an equal number of
-type and
-type phage virions. The resulting burst of b released virions rapidly attacks all types bacteria in proportion to their population sizes, but only some attacks lead to successful infections: (1) any invasion of susceptible bacteria (top right), (2) invasion of the defenseless lysogen
by an
-type virion, resulting in a double lysogen
(bottom right). (B) The two processes in (A) are combined into a single process (double arrows). The first line, for example, describes
/
lysogens inducing and immediately infecting susceptible bacteria, resulting in b copies of the same lysogen. (C-E) Time courses of invasion. A steady-state system of susceptible bacteria (B) and a lysogen (
) is invaded by a lysogen (
) with an anti-phage defense system; different outcomes are possible depending on the growth rate of
: (C)
drives
extinct for
, (D) coexistence of
and
for
, (E)
dies out for
. (F) Phase diagram of outcomes with respect to growth rate of
and burst size; letters C, D, E indicate corresponding
and b values for those panels. Parameters for plots: growth rates
and
, bacteria source S=0.001, burst size b = 100, dilution rate
, and induction rate
.
Equations 1–4 lead to distinct outcomes depending on the cost of the defense system. In Fig 1C – 1E, we show timecourses for invasions by a small population of into steady-state systems of B and
. For the smallest cost of the defense system (highest
), the invader drives
to extinction; for intermediate cost, all strains coexist; and for the largest cost (lowest
) the invasion fails. These results are summarized in the phase diagram in Fig 1F. (In the orange region, burst sizes are too small for lysogens to survive – the steady supply of susceptible bacteria B exhausts the system’s carrying capacity).
Prophage-borne abortive infection leads to bistability
Abortive infection is a qualitatively distinct alternative to the type of defense considered above. In contrast to defenses that prevent adsorption, genome entry, or intracellular replication while preserving the infected lysogen, abortive infection systems protect the surrounding clonal population by causing infected cells to die or arrest growth before the invading phage can complete its lytic cycle. Such systems are widespread and modern mechanistic studies have shown that toxin–antitoxin and related systems can function as abortive infection modules [12]. Importantly for the present study, abortive infection can also be prophage-borne. For example, the prophage-encoded BstA family mediates abortive infection against competing phages while cognate self-immunity protects the prophage that encodes the system [3]. To capture this biologically distinct mode of defense, we modified the model so that infection of an lysogen by virions released from
does not generate a double lysogen
. Instead,
cells infected by
-type virions are removed from the population, representing abortive death of the infected lysogen together with failure of the invading phage to establish a productive infection. We assume that
is immune to
virions via
’s superinfection exclusion, and thus the abortive infection system is not activated. (See Materials and Methods, section M2 for the corresponding modified equation for
.) As shown in Fig 2A, the death of
lysogens upon infection by
virions increases the region of
dominance. More surprisingly, abortive infection also leads to regions of bistability where the final outcome depends on the initial ratio of
to
, a prediction that could be tested experimentally. Fig 2B and 2C show the borderline ratio between the lysogens, which is independent of the initial bacteria population.
contains an abortive infection defense system, so that
dies without a burst when infected by
virions. (A) Phase diagram of outcomes with respect to growth rate of
and burst size. Compared to Fig 1F, the region of
dominance is decreased, and regions of bistability appear. Letters B, C, indicate the values
and b = 60,180 used for those panels, respectively. (B,C) Dependence of bistable outcomes on initial populations of
and
for white region (B) or purple region (C). Parameters for plots: growth rates
and
, initial bacteria population B(t = 0) = 0.3, bacteria source S = 0.001, dilution rate
, and induction rate
.
To gain insight into the regimes of bistability which occur when the growth rate of is high, it is helpful to consider the dynamics of the difference between
and
populations in the limit where
. In this limit, subtracting the modified equation for dL2/dt (see Materials and Methods, section M2) from Eq. 2 for dL1/dt yields
The term that multiplies is typically positive, which means that when L1 = L2, the dynamics of
is unstable, i.e., small positive values become more positive, while small negative values become more negative. Such divergent behavior is characteristic of bistability. One point to note is that in this limit, Eq. 2 for L1 and the modified Eq. 3 for L2 are actually perfectly symmetric – so why is there an asymmetry in the bistable solutions at large burst size, with either only
surviving or coexistence of
and
? To understand this asymmetry, consider the dynamics of L12 around the two steady states where only
or only
exist: in either case invasion by a small amount of the competing lysogen leads to creation of
lysogens via the process of
lysogens inducing and converting
lysogens to
. For the
-only state, the further induction of these
lysogens has little effect because their
-type virions can only convert the small population of
lysogens. By contrast, for the
-only fixed point, the
-type virions from the induced
lysogens target the initially large population of
lysogens, leading to an exponential increase of the
population. This is the key to the asymmetry in outcomes whereby the
-only state is stable against invasion, while the
-only state is unstable against invasion.
Consequences of mutational loss of a prophage-borne defense system
Fig 1F suggests that carrying a defense system can be quite advantageous for a phage. However, it is worth noting that if a phage-borne defense system has a small enough cost to drive competing phages to extinction, then the defense system might make itself unnecessary. Does this mean that phages should eventually lose their defense systems? To address this question, we allow for the defense system to be lost at a mutation rate during a new infection, as shown in Fig 3A and 3B. This adds two new types of lysogen
and
which carry versions of the temperate phage that have lost the defense system, and so do not pay a growth cost. For example, the population of
obeys
(A,B) Schematics of additional model elements: (A) Upon infection, the phage that creates lysogen has a small mutation probability
to lose its defense system (defenseless version denoted by a tilde). (B) Possible infection processes that result in defense system loss. While the phage that creates lysogen
can invade lysogen
and vice versa, the phages that create
and
are of the same type and so cannot invade each other. (C,D) Time courses of invasion (line colors not appearing in the legend are the same as in Fig 1). A steady-state system of susceptible bacteria (B) and a lysogen (
) is invaded by a lysogen (
) with an anti-phage defense system that can be lost; different outcomes are possible depending on the growth rate of
: (C) coexistence of all strains for
, (D) loss of
but coexistence of all defenseless strains for
. (E) Phase diagram of outcomes with respect to growth rate of
and burst size; letters C, D indicate corresponding
and b values for those panels. Parameters for plots as in Fig 1, with
; defenseless strains all have growth rate 1.
In short, we now allow mutations from an or
lysogen into a phage without a defense system at a rate
, and infection of
lysogens by
to make a double lysogen
(see Material and Methods, subsection M3 for the full set of equations). With these additions, we repeated the invasion simulations and found a striking outcome: for a small enough cost of the defense system, all strains now coexist (Fig 3C). For a higher cost, the two lysogens without defense systems,
and
, coexist symmetrically (Fig 3D), as they have identical characteristics. These results are summarized in the phase diagram in Fig 3E.
What is the origin of the state of complete coexistence? We attribute this state to a rock-paper-scissors-like relation among the three phages: As shown in Fig 3, outcompetes
. But now
outcompetes
, since the former pays no cost for defense, and by assumption these two phages of the same basic type cannot invade each other. Finally,
and
coexist since they are effectively identical competitors.
Rock-paper-scissors dynamics among competing lysogens
Can phage-borne defense systems lead to true rock-paper-scissors dynamics? Defense systems can be non-transitive, so we simulated a system of three temperate phages with cyclic immunity, but otherwise identical parameters (see Materials and Methods, subsection M4 for the full set of equations). As shown in Fig 4, two distinct outcomes occur depending on the growth rates of the single and double lysogens (triple lysogens can’t occur): As shown in Fig 4A, if the double lysogen growth rate is high enough, the system shows damped rock-paper-scissors oscillations, but eventually relaxes to a coexisting fixed point. However, as seen in Fig 4B for a lower growth rate of the double lysogens, the oscillations persist, becoming longer in period but remaining large in amplitude.
(A,B) Time courses of a system of three temperate phages carrying non-transitive defense systems: (Inset) is immune to
,
is immune to
, and
is immune to
. All double lysogens are present at low populations, but the triple lysogen is not possible. (A) Growth rates of single lysogens
and double lysogens
lead to slowing decaying oscillations to a coexistence fixed point. (B) Growth rates of single lysogens
and double lysogens
lead to persistent rock-paper-scissors oscillations with an increasing period. Other parameters for plots as in Fig 1.
Discussion and conclusion
In summary, we have shown that it can be highly beneficial for a temperate phage to carry a defense system against competing phage. In a simple model of two competing phages, a defensive phage with a 20% lower growth rate can still drive a competitor to extinction (for typical burst sizes of
100 virions). However, in nature, the advantage of carrying a defense system will depend both on the frequency with which multiple types of phages compete for the same bacterial host, and the effective range of the defense system. Since in principle fitness advantages as small as
can fix in bacterial populations, where effective population sizes
range from 106 to 108 or more [13], even occasional competition between phages could still favor phage carrying their own defense systems. This is consistent with the observation of many prophage-borne defenses in bacterial genomes [1,2,5].
An interesting question is where do bacteria get their phage defense systems from? Many of these systems reside in “defense islands”, which contain multiple defenses [14,15], and the contents of these islands are highly variable between closely related strains [16]. However, defenses are also observed scattered throughout bacterial genomes [17,18]. Moreover, similar systems are found among distantly related bacteria, implying that the defenses move among species via horizontal gene transfer. Our analysis suggests that temperate phage may be a significant contributor to this movement of defenses.
Some natural extensions of our model would include competition between defensive temperate phages and lytic phages or phages carrying counter-defense systems. We have also assumed that the defense system is absolute, whereas defenses may only be partial or may be regulated, e.g., by quorum sensing [19,20]. In natural settings, the competition among lysogens may also be spatially structured (our lysogen-only representation may still be useful for spatiotemporal modeling under the assumption that free virions quickly find targets). These scenarios and settings will quantitatively change competitive outcomes, but are not expected to change the overall advantage of phage-borne defenses. Indeed, a recent theoretical study of competition between superinfection-exclusion-positive or -negative lytic phages came to a similar conclusion regarding the substantial value of such a phage-borne defense system [21].
From an experimental perspective, our model of serial dilutions with addition of new susceptible bacteria is readily realizable. The main limitation is that we have not included adaptive mutations of either host or phage, which would eventually occur. Careful choices of bacteria, phage, and nutrients could minimize the development of bacterial resistance, e.g., by including key nutrients that require transport via phage receptors. We hope our work will inspire further consideration of the ecology and evolution of phage-borne defense systems.
Materials and methods
M1 Dimensionful equations
The dimensionful version of Eqs. (1)–(4) are
with , and all starred parameters are dimensionful. In this work, we chose
and
. Scaling all concentrations by the carrying capacity
, and defining
and
, we arrive at the dimensionless equations quoted in the text.
M2 Equations for the abortive infection defense system
For the abortive infection defense system, is lost upon being invaded by
, leading to an additional loss term to Eq. 3:
M3 Equations allowing for mutational loss of defense system
The full set of dimensionless equations, which allows for mutations that lead to a loss of a defense system, is
with
M4 Equations for the rock-paper-scissors model
The full set of the 3-phage rock-paper-scissors system that led to Fig 4 is given by
with the equations for and L23 obtained by cycling the indices
. Here
. To generate Fig 4 we used b = 100 and
, and
, where the values of
and
are quoted in the caption. All other parameters are the same as in Fig 3.
All sets of equations were simulated using Mathematica, which was also used to generate the plots.
Acknowledgments
We thank Lawrence (Owen) Abad for valuable suggestions. This work was performed in part at Aspen Center for Physics, which is supported by National Science Foundation grant PHY-1607611. This work was supported in part by Princeton University through the Center for the Physics of Biological Function.
References
- 1. Bondy-Denomy J, Qian J, Westra ER, Buckling A, Guttman DS, Davidson AR, et al. Prophages mediate defense against phage infection through diverse mechanisms. ISME J. 2016;10(12):2854–66. pmid:27258950
- 2. Dedrick RM, Jacobs-Sera D, Bustamante CAG, Garlena RA, Mavrich TN, Pope WH, et al. Prophage-mediated defence against viral attack and viral counter-defence. Nat Microbiol. 2017;2:16251. pmid:28067906
- 3. Owen SV, Wenner N, Dulberger CL, Rodwell EV, Bowers-Barnard A, Quinones-Olvera N, et al. Prophages encode phage-defense systems with cognate self-immunity. Cell Host Microbe. 2021;29(11):1620-1633.e8. pmid:34597593
- 4. Patel PH, Maxwell KL. Prophages provide a rich source of antiphage defense systems. Curr Opin Microbiol. 2023;73:102321. pmid:37121062
- 5. Brenes LR, Laub MT. E. coli prophages encode an arsenal of defense systems to protect against temperate phages. Cell Host Microbe. 2025;33(6):1004-1018.e5. pmid:40409266
- 6. Patel PH, Taylor VL, Zhang C, Getz LJ, Fitzpatrick AD, Davidson AR, et al. Anti-phage defence through inhibition of virion assembly. Nat Commun. 2024;15(1):1644. pmid:38388474
- 7. van Houte S, Buckling A, Westra ER. Evolutionary ecology of prokaryotic immune mechanisms. Microbiol Mol Biol Rev. 2016;80(3):745–63. pmid:27412881
- 8. Pleška M, Qian L, Okura R, Bergmiller T, Wakamoto Y, Kussell E, et al. Bacterial autoimmunity due to a restriction-modification system. Curr Biol. 2016;26(3):404–9. pmid:26804559
- 9. Zaayman M, Wheatley RM. Fitness costs of CRISPR-Cas systems in bacteria. Microbiology (Reading). 2022;168(7):10.1099/mic.0.001209. pmid:35849532
- 10. Levin BR, Stewart FM, Chao L. Resource-limited growth, competition, and predation: a model and experimental studies with bacteria and bacteriophage. Am Nat. 1977;111(977):3–24.
- 11. Stewart FM, Levin BR. The population biology of bacterial viruses: why be temperate. Theor Popul Biol. 1984;26(1):93–117. pmid:6484871
- 12. Chopin M-C, Chopin A, Bidnenko E. Phage abortive infection in lactococci: variations on a theme. Curr Opin Microbiol. 2005;8(4):473–9. pmid:15979388
- 13. Lynch M, et al. Gene duplication, loss and evolution in genome dynamics. Nat Rev Genet. 2016;17:651–64. Available from: https://www.nature.com/articles/nrg.2016.104
- 14. Makarova KS, Wolf YI, Snir S, Koonin EV. Evolution and classification of the CRISPR-Cas systems. J Bacteriol. 2011;193(8):2023–31. Available from: https://journals.asm.org/doi/10.1128/jb.05535-11
- 15. Georjon H, Bernheim A. The highly diverse antiphage defence systems of bacteria. Nat Rev Microbiol. 2023;21(10):686–700. pmid:37460672
- 16. Hochhauser D, Millman A, Sorek R. The defense island repertoire of the Escherichia coli pan-genome. PLoS Genet. 2023;19(4):e1010694. pmid:37023146
- 17. Vassallo CN, Doering CR, Littlehale ML, Teodoro GIC, Laub MT. A functional selection reveals previously undetected anti-phage defence systems in the E. coli pangenome. Nat Microbiol. 2022;7(10):1568–79. pmid:36123438
- 18. DeWeirdt PC, Mahoney EM, Laub MT. DefensePredictor: a machine learning model to discover novel prokaryotic immune systems. bioRxiv. 2025:2025.01.08.631726. Available from: https://www.biorxiv.org/content/10.1101/2025.01.08.631726v1.full.pdf
- 19. Høyland-Kroghsbo NM, Mærkedahl RB, Svenningsen SL. A quorum-sensing-induced bacteriophage defense mechanism. mBio. 2013;4(1):10.1128/mbio.00362-12.
- 20. Høyland-Kroghsbo NM, Paczkowski J, Mukherjee S, Broniewski J, Westra E, Bondy-Denomy J, et al. Quorum sensing controls the Pseudomonas aeruginosa CRISPR-Cas adaptive immune system. Proc Natl Acad Sci U S A. 2017;114(1):131–5. pmid:27849583
- 21. Hunter M, Fusco D. Superinfection exclusion: a viral strategy with short-term benefits and long-term drawbacks. PLoS Comput Biol. 2022;18(5):e1010125. pmid:35536864