The dense microbial ecosystem in the gut is intimately connected to numerous facets of human biology, and manipulation of the gut microbiota has broad implications for human health. In the absence of profound perturbation, the bacterial strains that reside within an individual are mostly stable over time 1 . By contrast, the fate of exogenous commensal and probiotic strains applied to an established microbiota is variable, generally unpredictable and greatly influenced by the background microbiota2,3. Therefore, analysis of the factors that govern strain engraftment and abundance is of critical importance to the emerging field of microbiome reprogramming. Here we generate an exclusive metabolic niche in mice via administration of a marine polysaccharide, porphyran, and an exogenous Bacteroides strain harbouring a rare gene cluster for porphyran utilization. Privileged nutrient access enables reliable engraftment of the exogenous strain at predictable abundances in mice harbouring diverse communities of gut microbes. This targeted dietary support is sufficient to overcome priority exclusion by an isogenic strain 4 , and enables strain replacement. We demonstrate transfer of the 60-kb porphyran utilization locus into a naive strain of Bacteroides, and show finely tuned control of strain abundance in the mouse gut across multiple orders of magnitude by varying porphyran dosage. Finally, we show that this system enables the introduction of a new strain into the colonic crypt ecosystem. These data highlight the influence of nutrient availability in shaping microbiota membership, expand the ability to perform a broad spectrum of investigations in the context of a complex microbiota, and have implications for cell-based therapeutic strategies in the gut.