Previous studies have shown that membrane-aerated biofilm (MAB) reactors can simultaneously remove carbonaceous and nitrogenous pollutants from wastewater in a single reactor. Oxygen is provided to MABs through gas-permeable membranes such that the region nearest the membrane is rich in oxygen but low in organic carbon, whereas the outer region of the biofilm is void of oxygen but rich in organic carbon. In this study, MABs were grown under similar conditions but at two different fluid velocities (2 and 14 cm s -1) across the biofilm. MABs were analyzed for changes in biomass density, respiratory activity, and bacterial community structure as functions of biofilm depth. Biomass density was generally highest near the membrane and declined with distance from the membrane. Respiratory activity exhibited a hump-shaped profile, with the highest activity occurring in the middle of the biofilm. Community analysis by PCR cloning and PCR-denaturing gradient gel electrophoresis of 16S rRNA genes demonstrated substantial stratification of the community structure across the biofilm. Population profiles were also generated by competitive quantitative PCR of gene fragments specific for ammonia-oxidizing bacteria (AOB) (amoA) and denitrifying bacteria (nirK and nirS). At a flow velocity of 14 cm s-1, AOB were found only near the membrane, whereas denitrifying bacteria proliferated in the anoxic outer regions of the biofilm. In contrast, at a flow velocity of 2 cm s-1, AOB were either not detected or detected at a concentration near the detection limit. This study suggests that, under the appropriate conditions, both AOB and denitrifying bacteria can coexist within an MAB.