The extent and biological relevance of horizontal gene transfer (HGT) in eukaryotic evolution remain highly controversial. Recent studies have demonstrated frequent and large-scale HGT from endosymbiotic bacteria to their hosts, but the great majority of these transferred genes rapidly become nonfunctional in the recipient genome. Here, we investigate an ancient HGT between a host metazoan and an endosymbiotic bacterium, Wolbachia pipientis. The transferred gene has so far been found only in mosquitoes and Wolbachia. In mosquitoes, it is a member of a gene family encoding candidate receptors required for malaria sporozoite invasion of the mosquito salivary gland. The gene copy in Wolbachia has substantially diverged in sequence from the mosquito homolog, is evolving under purifying selection, and is expressed, suggesting that this gene is also functional in the bacterial genome. Several lines of evidence indicate that the gene may have been transferred from eukaryotic host to bacterial endosymbiont. Regardless of the direction of transfer, however, these results demonstrate that interdomain HGT may give rise to functional, persistent, and possibly evolutionarily significant new genes.