Maternally transmitted symbionts persist over macroevolutionary timescales by undergoing occasional lateral transfer to new host species. To invade a new species, a symbiont must survive and reproduce in the new host, undergo maternal transmission, and confer a selective benefit sufficient to overcome losses due to imperfect maternal transmission. Drosophila neotestacea is naturally infected with a strain of Spiroplasma that restores fertility to nematode-parasitized females, which are otherwise sterilized by parasitism. We experimentally transferred Spiroplasma from D. neotestacea to four other species of mycophagous Drosophila that vary in their ability to resist and/or tolerate nematode parasitism. In all four species, Spiroplasma achieved within-host densities and experienced rates of maternal transmission similar to that in D. neotestacea. Spiroplasma restored fertility to nematode-parasitized females in one of these novel host species. Based on estimates of maternal transmission fidelity and the expected benefit of Spiroplasma infection in the wild, we conclude that Spiroplasma has the potential to spread and become abundant within Drosophila putrida, which is broadly sympatric with D. neotestacea and in which females are rendered completely sterile by nematode parasitism. Thus, a major adaptation within D. putrida could arise via lateral transmission of a heritable symbiont from D. neotestacea.