Innate immunity represents the first line of defense in animals. We report a genome-wide in vivo Drosophila RNA interference screen to uncover genes involved in susceptibility or resistance to intestinal infection with the bacterium Serratia marcescens. We first employed whole-organism gene suppression, followed by tissue-specific silencing in gut epithelium or hemocytes to identify several hundred genes involved in intestinal antibacterial immunity. Among the pathways identified, we showed that the JAK-STAT signaling pathway controls host defense in the gut by regulating stem cell proliferation and thus epithelial cell homeostasis. Therefore, we revealed multiple genes involved in antibacterial defense and the regulation of innate immunity.