The acquisition of foreign DNA by horizontal transfer from unrelated organisms is a major source of variation leading to new strains of bacterial pathogens. The extent to which this occurs varies widely, due in part to lifestyle factors that determine exposure to potential donors. Yersinia pestis, the plague bacillus, infects normally sterile sites in its mammalian host, but forms dense aggregates in the non-sterile digestive tract of its flea vector to produce a transmissible infection. Here we show that unrelated co-infecting bacteria in the flea midgut are readily incorporated into these aggregates, and that this close physical contact leads to high-frequency conjugative genetic exchange. Transfer of an antibiotic resistance plasmid from an Escherichia coli donor to Y. pestis occurred in the flea midgut at a frequency of 10-3 after only 3 days of co-infection, and after 4 weeks 95% of co-infected fleas contained an average of 103 antibiotic-resistant Y. pestis transconjugants. Thus, transit in its arthropod vector exposes Y. pestis to favourable conditions for efficient genetic exchange with microbial flora of the flea gut. Horizontal gene transfer in the flea may be the source of antibiotic-resistant Y. pestis strains recently isolated from plague patients in Madagascar.