Effector loss and gain drives host range at a fitness cost.
Epidemic preparedness depends on tracking microbial evolution that drives shifts in ecological behaviors such as disease emergence. However, the genetic constraints mediating microbial emergence for generalist and specialist behaviors remain poorly described. Here, we addressed this question by combining comparative and functional genomics with phylogeny-based evolutionary analyses of the cereal pathogen Xanthomonas translucens. We show that a generalist X. translucens subgroup arose from a specialist ancestor, and the loss of a single effector gene, xopAL1, contributed to the generalist host expansion by promoting host jump from barley to wheat. Deleting barley-specialist X. translucens xopAL1 recapitulated the host jump to wheat and demonstrates risk across each globally distributed genetic lineage. However, this niche expansion via XopAL1 loss incurs a significant fitness cost to colonize barley. Moreover, the specialist lineage gained an additional effector gene, xopAJ, which enhanced virulence on barley while restricting oat infection, thereby reinforcing niche specialization. We further conducted transcriptomic analysis of wheat and determined that XopAL1 triggers a defense response that involves the reduction of photosynthetic processes. Our work provides an experimentally validated evolutionary framework to understand mechanisms of intergenera host jump. Overall, we demonstrate that single events of gene loss and gain shape ecological behaviors by creating a dynamic trade-off between niche breadth and specialization.