SummaryBackgroundGlobally, prisons are high-incidence settings for tuberculosis. Yet the role of prisons as reservoirs of M. tuberculosis, propagating epidemics through spillover to surrounding communities, has been difficult to measure directly.MethodsTo quantify the role of prisons in driving wider community M. tuberculosis transmission, we conducted prospective genomic surveillance in Central West Brazil from 2014 to 2019. We whole genome sequenced 1152 M. tuberculosis isolates collected during active and passive surveillance inside and outside prisons and linked genomes to detailed incarceration histories. We applied multiple phylogenetic and genomic clustering approaches and inferred timed transmission trees.FindingsM. tuberculosis sequences from incarcerated and non-incarcerated people were closely related in a maximum likelihood phylogeny. The majority (70.8%; 46/65) of genomic clusters including people with no incarceration history also included individuals with a recent history of incarceration. Among cases in individuals with no incarceration history, 50.6% (162/320) were in clusters that included individuals with recent incarceration history, suggesting that transmission chains often span prisons and communities. We identified a minimum of 18 highly probable spillover events, M. tuberculosis transmission from people with a recent incarceration history to people with no prior history of incarceration, occurring in the state’s four largest cities and across sampling years. We additionally found that frequent transfers of people between the state’s prisons creates a highly connected prison network that likely disseminates M. tuberculosis across the state.InterpretationWe developed a framework for measuring spillover from high-incidence environments to surrounding communities by integrating genomic and spatial information. Our findings indicate that, in this setting, prisons serve not only as disease reservoirs, but also disseminate M. tuberculosis across highly connected prison networks, both amplifying and propagating M. tuberculosis risk in surrounding communities.FundingBrazil’s National Council for Scientific and Technological Development and US National Institutes of Health.