The response of bacterial biofilms to treatment with antimicrobial agents is often characterized by the emergence of recalcitrant cellular microcolonies. We present an individual-based model to investigate the biophysical mechanisms of the selective resistance that arises within the biofilm and leads to a spatially heterogeneous response upon treatment with antibiotics. The response occurs in 3 distinct phases. In the first phase, the subpopulation of metabolically active cells diminishes due to antibiotic-induced cell death. Subsequently, in the second phase, increased nutrient availability allows dormant cells in the lower layers of the biofilm to transform into metabolically active cells. In the third phase, survival of the biofilm is governed by the interplay between 2 contrasting factors: (1) rate of antibiotic-induced cell death and (2) rate of transformation of dormant cells into active ones. Metabolically active cells at the distal edge of the biofilm sacrifice themselves to protect the dormant cells in the interior by (1) reducing local antibiotic concentrations and (2) increasing nutrient availability. In the presence of quorum sensing, biofilms exhibit increased tolerance compared with the quorum sensing-negative strains. Extracellular polymeric substance (EPS) forms a protective layer at the top of the biofilm, thereby limiting antibiotic penetration. The surviving cells, in turn, produce EPS resulting in a feedback-like mechanism of resistance. Whereas resistance in QS − biofilms occurs because of transformation of dormant cells into metabolically active cells, this transformation is less pronounced in QS + biofilms, and resistance is a consequence of the sequestration of the antibiotic by EPS.