The ecological dynamics underlying the coexistence between antagonistic populations of bacteria and their viruses, bacteriophages (phages), in the mammalian gut microbiota remain poorly understood. We challenged a murine synthetic bacterial community with phages to study the factors allowing phages-bacteria coexistence. Coexistence was not dependent on the development of phage-resistant clones nor on the ability of phages to extend their host range. Instead, our data suggest that phage-inaccessible sites in the mucosa serve as a spatial refuge for bacteria. From there, bacteria disseminate in the gut lumen where they are predated by luminal phages fostering the presence of intestinal phage populations. The heterogeneous biogeography of microbes contributes to the long-term coexistence of phages with phage-susceptible bacteria. This observation could explain the persistence of intestinal phages in humans as well as the low efficiency of oral phage therapy against enteric pathogens in animal models and clinical trials.