Serratia marcescens is an entomopathogenic bacterium that opportunistically infects a wide range of hosts, including humans. In a model of septic injury, if directly introduced into the body cavity of Drosophila, this pathogen is insensitive to the host's systemic immune response and kills flies in a day. We find that S. marcescens resistance to the Drosophila immune deficiency (imd)-mediated humoral response requires the bacterial lipopolysaccharide O-antigen. If ingested by Drosophila, bacteria cross the gut and penetrate the body cavity. During this passage, the bacteria can be observed within the cells of the intestinal epithelium. In such an oral infection model, the flies succumb to infection only after 6 days. We demonstrate that two complementary host defense mechanisms act together against such food-borne infection: an antimicrobial response in the intestine that is regulated by the imd pathway and phagocytosis by hemocytes of bacteria that have escaped into the hemolymph. Interestingly, bacteria present in the hemolymph elicit a systemic immune response only when phagocytosis is blocked. Our observations support a model wherein peptidoglycan fragments released during bacterial growth activate the imd pathway and do not back a proposed role for phagocytosis in the immune activation of the fat body. Thanks to the genetic tools available in both host and pathogen, the molecular dissection of the interactions between S. marcescens and Drosophila will provide a useful paradigm for deciphering intestinal pathogenesis.