The mammalian intestine is home to ~100 trillion bacteria that performimportant metabolic functions for their hosts. The proximity of vast numbers of bacteria to host intestinal tissues raises the question of how symbiotic host-bacterial relationships are maintained without eliciting potentially harmful immune responses. Here, we show that RegIIIg, a secreted antibacterial lectin, is essential for maintaining a ~50-micrometer zone that physically separates the microbiota from the small intestinal epithelial surface. Loss of host-bacterial segregation in RegIIIγ-/- mice was coupled to increased bacterial colonization of the intestinal epithelial surface and enhanced activation of intestinal adaptive immune responses by the microbiota. Together, our findings reveal that Reglllγ is a fundamental immune mechanism that promotes host-bacterial mutualism by regulating the spatial relationships between microbiota and host.