Agricultural systems rely on healthy soils and their sustainability requires understanding the long-term impacts of agricultural practices on soils, including microbial communities. We examined the impact of 17 years of land management on soil bacterial communities in a New Zealand randomized-block pasture trial. Significant variation in bacterial community structure related to mowing and plant biomass removal, while nitrogen fertilizer had no effect. Changes in soil chemistry and legume abundance described 52% of the observed variation in the bacterial community structure. Legumes (Trifolium species) were absent in unmanaged plots but increased in abundance with management intensity; 11% of the variation in soil bacterial community structure was attributed to this shift in the plant community. Olsen P explained 10% of the observed heterogeneity, which is likely due to persistent biomass removal resulting in P limitation; Olsen P was significantly lower in plots with biomass removed (14 mg kg−1 ± 1.3SE) compared with plots that were not mown, or where biomass was left after mowing (32 mg kg−1 ± 1.6SE). Our results suggest that removal of plant biomass and associated phosphorus, as well as shifts in the plant community, have greater long-term impacts on soil bacterial community structure than application of nitrogen fertilizers.