For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

On Tuesday night, Kentucky Attorney General Andy Beshear, while declaring victory over the Trumpish “bully” incumbent Matt Bevin, made sure to praise one group of voters Bevin had bad-mouthed during his first term: teachers.

“To our educators, your courage to stand up and fight against all the bullying and name-calling helped galvanize our entire state,” Beshear, the son of the state’s last Democratic governor, said in his acceptance speech. (Bevin has refused to concede and on Wednesday requested a re-canvassing of the vote totals, which have Beshear winning by just over 5,000 votes.)

Teachers were everywhere on Tuesday night, scoring victories across the US map. In San Francisco, a city where teachers can barely afford to live and work on their meager salary, voters not only approved a $600 million affordable housing bond but also a measure known as Proposition E that would loosen zoning rules to develop affordable and educator housing on publicly owned property. Proposition A would let the city get millions in loans toward developing extremely low-, low-, and middle-income housing. In San Francisco, union officials say, between 300 and 700 teachers a year leave the district each year. In theory, at least, the measures could help with retention.

And in Denver, where teachers went on strike earlier this year, teachers-union–backed candidates won two seats and led a third as of Wednesday, bolstering union hopes for flipping a board that, for the past decade, has mostly been led by education reform–backed members. A shift in the board could augur a move away from controversial practices like closing under-performing schools.

The wins in San Francisco and Denver were the latest in a string of victories for teachers, who in recent years have taken to the streets to call for better working conditions and more resources. Just last week, after an 11-day strike, Chicago teachers came to an agreement with that city’s mayor, Lori Lightfoot, and the district. The city agreed to dedicate $35 million toward reducing class sizes; hire hundreds of new social workers, case managers, and other support staffers throughout the district; and raise teacher pay by 16 percent over five years.

In recent years there have also been teacher work stoppages in Los Angeles and Oakland. In 2018, Kentucky educators shut schools down and demonstrated at the state capitol after Bevin bad-mouthed teachers and signed a bill that would reform state pensions—a law that was challenged and overturned in state court by Beshear and teachers unions.

Throughout the race, Beshear framed himself as the teachers’ candidate, promising raises and making education a top budget priority. He has endorsed teachers’ causes, like reducing class sizes and boosting the number of support staffers and mental health services. Bevin, on the other hand, rarely misses a chance to dump on teachers. He knocked them for using the protest as an excuse to take off work. He compared them and other state workers to drowning victims who are fighting their own rescuers. He said they and other state workers had a “thug mentality.” As a political matter, this was always a bit of a gambit—in Kentucky, schools represent a major employer in most of the state’s 120 counties. It appears to have backfired.