Although Drosophila systemic immunity is extensively studied, little is known about the fly's intestine-specific responses to bacterial infection. Global gene expression analysis of Drosophila intestinal tissue to oral infection with the Gram-negative bacterium Erwinia carotovora revealed that immune responses in the gut are regulated by the Imd and JAK-STAT pathways, but not the Toll pathway. Ingestion of bacteria had a dramatic impact on the physiology of the gut that included modulation of stress response and increased stem cell proliferation and epithelial renewal. Our data suggest that gut homeostasis is maintained through a balance between cell damage due to the collateral effects of bacteria killing and epithelial repair by stem cell division. The Drosophila gut provides a powerful model to study the integration of stress and immunity with pathways associated with stem cell control, and this study should prove to be a useful resource for such further studies.