Does flexible pay increase the gender wage gap? To answer this question we analyze the wages of public-school teachers in Wisconsin, where a 2011 reform allowed school districts to set teachers’ pay more flexibly and engage in individual negotiations. Using quasi-exogenous variation in the timing of the introduction of flexible pay driven by the expiration of preexisting collective-bargaining agreements, we show that flexible pay increased the gender pay gap among teachers with the same credentials. This gap is larger for younger teachers and absent for teachers working under a female principal or superintendent. Survey evidence suggests that the gap is partly driven by women not engaging in negotiations over pay, especially when the counterpart is a man. This gap is not driven by gender differences in job mobility, ability, or a higher demand for male teachers. We conclude that environmental factors are an important determinant of the gender wage gap in contexts where workers are required to negotiate.