Communication based on small signalling molecules is widespread among bacteria. Recently, such communication was also described in bacteriophages. Upon infection of a host cell, temperate phages of the Bacillus subtilis-infecting SPbeta group induce the secretion of a phage-encoded signalling peptide, which is used to inform the lysis-lysogeny decision in subsequent infections: the phages produce new virions and lyse their host cell when the signal concentration is low, but favour a latent infection strategy, lysogenising the host cell, when the signal concentration is high. Here, we present a mathematical model to study the ecological and evolutionary dynamics of such viral communication. We show that a communication strategy in which phages use the lytic cycle early in an outbreak (when susceptible host cells are abundant) but switch to the lysogenic cycle later (when susceptible cells become scarce) is favoured over a bet-hedging strategy in which cells are lysogenised with constant probability. However, such phage communication can evolve only if phage-bacteria populations are regularly perturbed away from their equilibrium state, so that acute outbreaks of phage infections in pools of susceptible cells continue to occur. Our model then predicts the selection of phages that switch infection strategy when half of the available susceptible cells have been infected.inhibits the phage's lysogeny-inhibition factors, thus increasing the propenstiy towards lysogeny of subsequent infections [9]. Hence, peptide communication is used to promote lysogeny when many infections have occurred. Similar arbitrium-like systems have now been found in a range of different phages [10]. Notably, these phages each use a slightly different signalling peptide, and do not seem to respond to the signals of other phages [9,10].The discovery of phage-encoded signalling peptides raises the question of how this viral communication system evolved. While the arbitrium system has not yet been studied theoretically, previous work has considered the evolution of lysogeny and of other phage-phage interactions. Early modelling work found that lysogeny can evolve as a survival mechanism for phages to overcome periods in which the density of susceptible cells is too low to sustain a lytic infection [11,12]. In line with these model predictions, a combination of modelling and experimental work showed that selection pressures on phage virulence change over the course of an epidemic, favouring a virulent phage strain early on, when the density of susceptible cells is high, but a less virulent (i.e., lysogenic) phage strain later in the epidemic, when susceptible cells have become scarce [13,14]. Other modelling work has shown that if phages, lysogenised cells, and susceptible cells coexist for long periods of time, the susceptible cell density becomes low because of phage exploitation, and less and less virulent phages are selected [15,16].Erez et al. [9] propose that the arbitrium system may have evolved to allow phages to cope with the changing envi...