The effects of top-down (e.g., herbivory) and bottom-up (e.g., nutrient supply) processes on primary producers are often interdependent. In stream ecosystems, interactions between herbivorous grazers and physical factors, such as light and temperature, can alter the abundance and taxonomic composition of epilithic nitrogen (N) fixers. To examine how grazing and physical factors mediate the source ofNto stream ecosystems, we conducted an in-situ grazer exclusion experiment by removing crawling invertebrate grazers from epilithon-covered rocks in 3 streams with varying drainage areas, representing a gradient of temperature and light levels, within a northern California river network. After ∼1mo of grazer exclusion, we measured epilithon biomass and composition,N2 fixation, and ammonium (NH4), nitrate (NO3), and phosphate (PO4) uptake rates. Epilithic biomass, N2-fixation rates, and N and phosphorus uptake rates differed among the 3 streams, and rates were highest in the largest, open-canopy stream. Increases in N2-fixation rates with stream size were due to higher nitrogenase activity per unit of biomass as well as higher absolute biomass of N2 fixers. The presence of grazers interacted with physical factors to control nutrient fluxes. Ecologically-significant grazer removal effects only occurred in the largest stream, where grazing increased the influx of atmospheric N2 to the benthic biofilm. N2-fixation rates increased with grazing while NH4 uptake rates decreased by a similar proportion, shifting the predominant N source from the assimilation of dissolved N to atmospheric N2 via fixation by cyanobacteria. By altering the balance between N2 fixation and water column N uptake, grazers can mediate the flux of N to stream ecosystems