Encounters among bacteria and their viral predators (bacteriophages) are among the most common ecological interactions on Earth. These encounters are likely to occur with regularity inside surface-bound communities that microbes most often occupy in natural environments. Such communities, termed biofilms, are spatially constrained: interactions become limited to near neighbors, diffusion of solutes and particulates can be reduced, and there is pronounced heterogeneity in nutrient access and physiological state. It is appreciated from prior theoretical work that phage-bacteria interactions are fundamentally different in spatially structured contexts, as opposed to well-mixed liquid culture. Spatially structured communities are predicted to promote the protection of susceptible host cells from phage exposure, and thus weaken selection for phage resistance. The details and generality of this prediction in realistic biofilm environments, however, are not known. Here, we explore phage-host interactions using experiments and simulations that are tuned to represent the essential elements of biofilm communities. Our simulations show that in biofilms, phage-resistant cells-as their relative abundance increases-can protect clusters of susceptible cells from phage exposure, promoting the coexistence of susceptible and phage-resistant bacteria under a large array of conditions. We characterize the population dynamics underlying this coexistence, and we show that coexistence is recapitulated in an experimental model of biofilm growth measured with confocal microscopy. Our results provide a clear view into the dynamics of phage resistance in biofilms with single-cell resolution of the underlying cell-virion interactions, linking the predictions of canonical theory to realistic models and in vitro experiments of biofilm growth.IMPORTANCE In the natural environment, bacteria most often live in communities bound to one another by secreted adhesives. These communities, or biofilms, play a central role in biogeochemical cycling, microbiome functioning, wastewater treatment, and disease. Wherever there are bacteria, there are also viruses that attack them, called phages. Interactions between bacteria and phages are likely to occur ubiquitously in biofilms. We show here, using simulations and experiments, that biofilms will in most conditions allow phage-susceptible bacteria to be protected from phage exposure, if they are growing alongside other cells that are phage resistant. This result has implications for the fundamental ecology of phage-bacteria interactions, as well as the development of phage-based antimicrobial therapeutics.