Phosphorus (P) fertilization plays a critical role in cereal production, particularly in calcareous dryland soils; however, its ecological consequences on weed community dynamics remain underexplored. This study evaluated how P enrichment alters weed diversity, composition, and dominance within barley (Hordeum vulgare L.) systems across two agroecological zones in northwestern Iran. Field experiments were conducted on 20 barley farms under rainfed and irrigated conditions during 2022–2023, with four P levels (4, 8, 12, and 16 mg P kg⁻¹ soil) applied as triple superphosphate. Weed communities were surveyed at stem elongation, and barley yield assessed at maturity. Diversity indices (Shannon, Margalef, Menhinick), and a combination of univariate (ANOVA, GLMM) and multivariate (RDA, NMDS, PERMANOVA) analyses were employed to interpret treatment effects. Results showed that moderate P inputs (8–12 mg P kg⁻¹) significantly increased weed richness and biomass without altering evenness. Phosphorus enrichment induced distinct community shifts, with species such as Vaccaria hispanica, Centaurea cyanus, and Papaver rhoeas proliferating under high P. RDA and NMDS ordinations confirmed strong compositional divergence across treatments and sites. Notably, both crop yield and weed biomass increased with P, indicating parallel responsiveness. Location-specific filtering effects further structured weed communities, emphasizing the role of local edaphic conditions. These findings demonstrate that phosphorus acts as both a crop nutrient and ecological filter in agroecosystems, shaping weed–crop interactions and community assembly. Integrating weed diagnostics into fertilization strategies may improve nutrient use efficiency and biodiversity management in low-input barley systems on calcareous soils.