Insects are major vectors of plant and animal disease, and bacterial phytopathogens are often disseminated by flies. We have previously reported that some isolates of the phytopathogenic bacterial species Erwinia carotovora infect Drosophila and activate an immune response. Using a genetic screen, we have now identified two genes that are required by E. carotovora to infect Drosophila. One of these genes has a regulatory role whereas the other, evf, confers an infectious phenotype: its transfer to non-infectious Erwinia strains or to several enterobacteria improves survival in the gut and triggers the immune response. Overexpression of Erwinia virulence factor (evf) allowed bacteria to colonize the apical side of the gut epithelium and in some cases to spread to the body cavity. Our results demonstrate a specific interaction between plant pathogens and flies that promote their dissemination.