Bacterial biofilms account for a significant number of hospital-acquired infections and complicate treatment options, because bacteria within biofilms are generally more tolerant to antibiotic treatment. This resilience is attributed to transient bacterial subpopulations that arise in response to variations in the microenvironment surrounding the biofilm. Here, we probed the spatial proteome of surface-associated single-species biofilms formed by uropathogenic Escherichia coli (UPEC), the major causative agent of community-acquired and catheter-associated urinary tract infections. We used matrix-assisted laser desorption/ionization (MALDI) time-of-flight (TOF) imaging mass spectrometry (IMS) to analyze the spatial proteome of intact biofilms in situ. MALDI-TOF IMS revealed protein species exhibiting distinct localizations within surface-associated UPEC biofilms, including two adhesive fibers critical for UPEC biofilm formation and virulence: type 1 pili (Fim) localized exclusively to the air-exposed region, while curli amyloid fibers localized to the air-liquid interface. Comparison of cells grown aerobically, fermentatively, or utilizing an alternative terminal electron acceptor showed that the phase-variable fim promoter switched to the "OFF" orientation under oxygen-deplete conditions, leading to marked reduction of type 1 pili on the bacterial cell surface. Conversely, S pili whose expression is inversely related to fim expression were up-regulated under anoxic conditions. Tethering the fim promoter in the "ON" orientation in anaerobically grown cells only restored type 1 pili production in the presence of an alternative terminal electron acceptor beyond oxygen. Together these data support the presence of at least two regulatory mechanisms controlling fim expression in response to oxygen availability and may contribute to the stratification of extracellular matrix components within the biofilm. MALDI IMS facilitated the discovery of these mechanisms, and we have demonstrated that this technology can be used to interrogate subpopulations within bacterial biofilms.