Bacteriophages, the viruses of bacteria, are proposed to drive bacterial population dynamics, yet direct evidence of their impact on natural populations is limited. We identified viral sequences in a metapopulation of wild plant-associated Pseudomonas strains. We discovered that all pathogenic lineages encode a tailocin - a phage-derived element that bacteria use to kill competitors for interbacterial warfare. Each plant-pathogenic Pseudomonas strain carries one of a few distinct tailocin variants, which target variable polysaccharides in the outer membrane of co-occurring pathogenic strains. suggesting the continued use of a defined set of tailocin haplotypes and receptors. These results raise the possibility that tailocin genetic diversity can be mined to develop targeted "tailocin cocktails" for microbial control in plants.