Evolutionary biologists have long debated over the repeatability of evolution, which is driven by both deterministic and historical processes [1, 2]. Deterministic processes, involving selection associated with interactions between the focal species and their environments, tend to result in convergent evolution of parallel lineages among similar habitats [3, 4]. In contrast, historically contingent processes, often involving stochastic events, such as species colonization [5] and mutation [6], can result in different evolutionary trajectories and outcomes across similar habitats, making evolution largely unpredictable [7]. While the roles of both determinism and historical contingency in evolution have been well recognized [1], mechanisms that regulate their relative importance remain poorly understood.

Here, we explore the role of parasitism, specifically the timing of parasite arrival, in modulating the repeatability of adaptive radiation. Parasites may have various effects on their hosts, such as the alternation of host population size [8], dynamics [9], and competitive ability [10]. These effects may, in turn, alter the strength of priority effects (i.e. the inhibitory or facilitative effects of ancestral or earlier emerging species on later emerging ones) and thus the importance of historical contingency in evolving host lineages. Priority effects may be further modified by the timing of parasite arrival, analogous to predator arrival timing influencing prey community assembly via, for instance, the long-lasting influences of transient predator-prey interactions [11]. Nevertheless, despite the inherent stochasticity of parasite colonization relative to their hosts, the effect of such stochastic parasite arrival timing on host adaptive diversification remains unexplored.

We examined the effect of bacteriophage arrival timing on the repeatability of bacterial evolution, using the fast-evolving bacterium Pseudomonas fluorescens SBW25 (hereafter SBW25) [12] and the bacteriophage ϕ2 [13] as the model system. Through adaptive radiation, SBW25 rapidly evolves from one smooth morph (SM) phenotype into several biofilm-forming specialists, including wrinkly (WS) and fuzzy spreader (FS) phenotypes, in aqueous microcosms. For generality, we used two strains (original and evolved; see SI for details) of ϕ2, with the evolved ϕ2 co-evolving with SBW25 for 9-d prior to the experiment. We allowed SBW25 to diversify for a varying number of days before invading them with one of the two phage strains. Phenotypic variation (β-diversity) among the six replicate lineages was quantified at the end of the experiment (day 10).

Both ϕ2 strains suppressed the host SBW25’s diversification (Figs. S1 and S2; generalized linear model: P < 0.001), whereas ϕ2 arrival time did not affect SBW25 phenotypic richness (P = 0.715). However, the phenotypic variation (β-diversity) among replicate host populations was strongly influenced by ϕ2 arrival time (permutational ANOVA: P < 0.001). As ϕ2 colonized earlier, β-diversity increased (Figs. 1 and S3; original: R2 = 0.157, P < 0.001; evolved: R2 = 0.472, P < 0.001), indicating that earlier ϕ2 colonization reduced the repeatability of SBW25 adaptive radiation. The effect of the arrival time of the evolved ϕ2 was stronger than that of the original strain (Fig. 1; ANCOVA: interaction term, P < 0.001), possibly suggestive of the increased virulence of the evolved strain (see Fig. S4).

Fig. 1: The relationship between phage arrival time and SBW25 phenotype turnover (β-diversity; measured as Bray-Curtis dissimilarity index) among replicates according to the main experiment.
figure 1

The solid line delineates the significant relationship between the original phage arrival time and SBW25 phenotype turnover (data shown by solid circles); the dashed line delineates the significant relationship between the evolved phage arrival time and SBW25 phenotype turnover (data shown by open circles). Jitters were used horizontally to separate data between the original and evolved phage treatments.

The evolutionary differentiation of SBW25 phenotypes is known to be driven by negative frequency-dependent selection, which allows newly emerged WS to increase from low frequency and eventually drives SBW25 diversification to converge over time [14]. We speculated that parasites might have altered host evolutionary repeatability by disrupting the negative frequency dependence between host phenotypes. This could occur when, for example, the presence of large parasite populations makes it difficult for rare, emerging host phenotypes to establish viable populations.

To examine this possibility, we conducted a selection experiment varying the initial ratio of WS and SM, in the absence and presence of ϕ2. Consistent with previous work [12, 15], we found that when ϕ2 was absent, WS fitness (relative to SM) declined as WS initial frequency increased (Fig. 2a; R2 = 0.889, P < 0.001), indicating the operation of negative frequency-dependent selection. However, when ϕ2 was present, the relationship between WS fitness and frequency became hump-shaped (Fig. 2b; original: R2 = 0.794, P < 0.001; evolved: R2 = 0.587, P = 0.004), such that the frequency dependence was positive when WS was rare and negative when WS was abundant. These results lend support to our hypothesis, suggesting that the initial rarety of newly evolved WS phenotypes favored their establishment in the absence, but not in the presence of ϕ2.

Fig. 2: The relative fitness of the wrinkly spreader (WS) to the smooth morph (SM) showed in the follow-up competition experiment.
figure 2

We detected a negative relationship between WS initial frequency and fitness in the absence of phage (a) and hump-shaped relationships in the presence of original (solid circles with the solid line) and evolved phages (open circles with the dashed line; b) according to regressions. The initial frequency was ln-transformed, and the fitness was quantified as the selection rate constant.

We suggest that interacting with stochasticity in the emergence of novel phenotypes (see Fig. S5), the positive frequency dependence in the presence of parasites (Fig. 2), which disfavors rare, newly evolved host phenotypes, drove the observed temporal dependency of parasite effect on host evolution (Fig. 1). At the early stage of adaptive radiation, different SBW25 populations contained different, few fast-evolving novel phenotypes (Fig. S5). The colonization of the parasite at this stage, through promoting host positive frequency dependence, made it difficult for additional new phenotypes from getting established, resulting in greater historical contingency and lower repeatability in SBW25 evolution. During the late stage of adaptive radiation, replicate SBW25 populations were similar in phenotypic composition as a result of deterministic inter-phenotypic competition (Fig. S5). Parasites that colonized at this stage suppressed the same competitively inferior phenotypes from all SBW25 populations, reinforcing deterministic host assembly. An alternative, but not mutually exclusive, explanation for the reduced determinism of SBW25 evolution with earlier parasite arrival is that the longer period of host-parasite coevolution, under earlier parasite arrival, offered more opportunity for the evolution of different parasite-resistant host strains and subsequent different evolutionary trajectories across replicate lineages. We acknowledge that this scenario cannot be examined using data collected in our experiment designed to study within-host diversification. Nevertheless, the importance of host-parasite coevolution for the historical contingency in host evolution is a worthy topic for future studies.

Our study is the first, to our knowledge, to experimentally explore the effects of parasite arrival time on the repeatability of host evolution. We show that whereas parasites suppress host adaptive radiation, their early arrival promotes the historical contingency in host diversification. These findings improve our understanding of mechanisms regulating microbial evolution, as well as help reconcile the mixed findings on the importance of determinism and stochasticity for community assembly on ecological time scales [11, 16, 17].