BackgroundBacteria and their viruses, bacteriophages, are the most abundant entities of the gut microbiota, a complex community of microorganisms associated with human health and disease. In this ecosystem, the interactions between these two key components are still largely unknown. In particular, the impact of the gut environment on bacteria and their associated prophages is yet to be deciphered.ResultsTo gain insight into the activity of lysogenic bacteriophages within the context of their host genomes, we performed proximity ligation-based sequencing (Hi-C) in both in vitro and in vivo conditions on the 12 bacterial strains of the OMM12synthetic bacterial community stably associated within mice gut (gnotobiotic mouse line OMM12). High-resolution contact maps of the chromosome 3D organization of the bacterial genomes revealed a wide diversity of architectures, differences between environments, and an overall stability over time in the gut of mice. The DNA contacts pointed at 3D signatures of prophages leading to 16 of them being predicted as functional. We also identified circularization signals and observed different 3D patterns between in vitro and in vivo conditions. Concurrent virome analysis showed that 11 of these prophages produced viral particles and that OMM12mice do not carry other intestinal viruses.ConclusionsThe precise identification by Hi-C of functional and active prophages within bacterial communities will unlock the study of interactions between bacteriophages and bacteria across conditions (healthy vs disease).Video AbstractSupplementary InformationThe online version contains supplementary material available at 10.1186/s40168-023-01541-x.