Wolbachia are intracellular bacterial symbionts that are able to protect various insect hosts from viral infections. This tripartite interaction was initially described in Drosophila melanogaster carrying wMel, its natural Wolbachia strain. wMel has been shown to be genetically polymorphic and there has been a recent change in variant frequencies in natural populations. We have compared the antiviral protection conferred by different wMel variants, their titres and influence on host longevity, in a genetically identical D. melanogaster host. The phenotypes cluster the variants into two groups--wMelCS-like and wMel-like. wMelCS-like variants give stronger protection against Drosophila C virus and Flock House virus, reach higher titres and often shorten the host lifespan. We have sequenced and assembled the genomes of these Wolbachia, and shown that the two phenotypic groups are two monophyletic groups. We have also analysed a virulent and over-replicating variant, wMelPop, which protects D. melanogaster even better than the closely related wMelCS. We have found that a ~21 kb region of the genome, encoding eight genes, is amplified seven times in wMelPop and may be the cause of its phenotypes. Our results indicate that the more protective wMelCS-like variants, which sometimes have a cost, were replaced by the less protective but more benign wMel-like variants. This has resulted in a recent reduction in virus resistance in D. melanogaster in natural populations worldwide. Our work helps to understand the natural variation in wMel and its evolutionary dynamics, and inform the use of Wolbachia in arthropod-borne disease control.