Carbon (C) fluxes in semiarid grasslands subject to precipitation variability play a critical role in the terrestrial C cycle. However, how ecosystem C fluxes respond to variability in precipitation (both decreases and increases precipitation along a gradient) remains unclear. In this study, we conducted a three-year field experiment in a semiarid grassland, with six precipitation treatments (precipitation decreased by 70%, 50%, and 30% [P-70%, P-50%, and P-30%], natural precipitation [P+0%], and precipitation increased by 30% and 50% [P+30% and P+50%]) to examine how variations in precipitation influence ecosystem C fluxes, specifically focusing on gross ecosystem productivity (GEP), ecosystem respiration (ER), and net ecosystem CO