In early April, advocates of public education were dismayed to see Rahm Emanuel, backed by a $30 million-plus war chest and free-flowing super PAC funds, beat back insurgent progressive Jesus “Chuy” Garcia in the Chicago mayor’s race. Now, six weeks later, it looks like education activists might have reason to celebrate—albeit in a different mayor’s race, several hundred miles away.

Today Philadelphia voters are heading to the polls to vote in the primaries for mayor and City Council. Since the city is overwhelmingly Democratic, the winners of the party’s primary will likely be the winners of the general election. For weeks, the mayoral race looked like a dead heat between public-schools advocate and former City Councilman Jim Kenney and charter-schools booster and State Senator Anthony Williams. Before that, Williams had been seen as an almost unbeatable front-runner. But a poll released on May 13 changed the calculus: Kenney, who is backed by the teachers’ union, had the support of 42 percent of Democratic voters while Williams, who is backed by a trio of wealthy suburban financiers, was trailing with 15 percent alongside former District Attorney Lynne Abraham.

News of Jim Kenney’s swift climb in the polls was greeted with shock by observers, given Williams’s huge cash advantage and presumed support from black voters. Williams, an African-American, is a longtime West Philadelphia politician and the son of one of the city’s pioneering black political activists. Kenney is a white South Philadelphian who has, during his years on City Council, remade himself from a conservative Democrat into an outspoken and surprisingly vocal progressive, successfully pushing to decriminalize marijuana in the city and to end local police cooperation with Immigrations and Customs Enforcement. But he is a relative newcomer to the center stage of the city’s grinding schools debate. As the race began, public-school advocates were desperately seeking a candidate to take on Williams, who seemed headed for a likely victory. Kenney got into the race after others took a pass, including powerful City Council President Darrell Clarke.

Kenney opposes the expansion of charter schools until the state restores assistance to manage the resulting costs, and calls for tougher oversight of the privately managed public schools. Williams, by contrast, is a high-profile supporter not only of charter schools but also of taxpayer-funded vouchers for private-school tuition. Both speak in favor of boosting state funding of city schools, a controversial issue among Republicans in the state legislature, but a basic litmus test for any Philadelphia politician.

Kenney’s late entry did not at first seem to bode well for his chances against Williams. The election is Philadelphia’s first major post–Citizens United showdown, and, as in Chicago, outside money flowed into the city in record amounts, most copiously from the three suburban financiers backing Williams: Joel Greenberg, Jeff Yass, and Arthur Dantchik. The three founders of the Susquehanna International Group (SIG) are committed “school choice” enthusiasts and ideologues—Yass is on the board of the libertarian Cato Institute and Dantchik serves on the board of the libertarian Institute for Justice law firm—and together they donated more than $6.6 million to the pro-Williams American Cities super PAC as of May 8, according to The Philadelphia Inquirer. Five years earlier, in 2010, they spent more than $5 million on Williams’s quixotic and failed campaign for governor.

It’s easy to see why Williams and his SIG supporters would be so intent on taking City Hall (and why public-school advocates would be so anxious to stop him): Winning the mayoralty would be a major political victory. It would also be a sharp reversal for public-education advocates, who celebrated Republican Governor Tom Corbett’s November loss to Democrat Tom Wolf in an election widely viewed as a negative referendum on his school-budget cuts. And Williams (and by extension his backers) would wield real power over city schools.

The mayor controls two seats on the School Reform Commission (SRC), which was created after the 2001 state takeover of the district—the governor controls three. The two mayoral seats on the SRC will become vacant in 2017. The new mayor’s appointees will either cooperate with Governor Wolf’s appointees or with former City Councilman Bill Green, a Corbett appointee, union foe, charter school fan and vocal Williams supporter. Recently, Green has endorsed a Republican proposal in the state Legislature to create a Louisiana-style statewide school district to take over underperforming schools. Green, the son of a former mayor, is also a possible, though unlikely, independent candidate for mayor in the general election in November.

The mayor and City Council will also decide whether and how much to boost local funding for the school district (the much greater need, however, is from the state). Currently, the School District of Philadelphia is unable to make any sort of realistic budget for the coming school year thanks to the turmoil in city and state politics.

With his millions in PAC support and position as the race’s most high-profile black candidate, Williams seemed to be off to a promising start. Yet, judging by the most recent poll, the SIG trio’s efforts seem to have backfired. Most likely, Kenney’s rise and Williams’s fall were propelled by a mix of forces, but education, and the dire condition of Philly schools, were clearly significant ones.

Philadelphia’s school system has been under assault for many years. The crisis, rooted in this country’s longstanding separate-and-unequal public school system, peaked after former Governor Corbett took office in 2011. Corbett pushed through deep cuts to education in Philadelphia and other long-underfunded, low-income districts, ultimately forcing the elimination of thousands of teacher and staff positions. In Philly, charter schools with very little oversight expanded rapidly, costing the district an enormous sum of money and further destabilizing neighborhood schools. The result was a cascade of school closings in the city’s poorest neighborhoods. Although Superintendent William Hite said the closings were necessary for the district’s fiscal survival, much of the public perceived them as yet another act of disinvestment from struggling neighborhoods.

Teachers struggled to manage the crisis, spending money out of their own pockets to buy supplies, working overtime and protesting Governor Corbett and the SRC alongside their students. At the same time, the self-described reform movement, a constellation of well-funded local and statewide groups, exploited the man-made disaster to paint public management of schools as a failure, attack the teachers’ union and push for the expansion of privately managed charters as the solution.

Meanwhile, many parents grew frustrated. The families of Philadelphia’s school children were all too painfully aware that their kids’ schools were in desperate need of more funding to counter the problems created by overcrowded classrooms, under-resourced schools counselors, overworked nurses scrambling from school to school, and barely there music and arts programs. Voters overwhelmingly rank education as their number-one concern.

Interestingly, much of this has played out in the background of the election. Despite the influential role education has played in the race, Williams and Kenney have spent little time publicly debating the core issues that define the city’s education wars: charter schools, vouchers, standardized testing, and the teachers’ union. They did address the need to boost school funding, but they never ventured far beyond that shared plank. It was safer for both candidates to avoid the more divisive subjects.

It’s not hard to understand why Williams shunned the debate. While 31 percent of Philly public students attend charter schools, and many parents like the charter their child attends, there is no indication that these parents identify as part of a broader “reform” movement, and there has been no widespread mobilization in favor of charter schools in general. There have, however, been mass protests in favor of saving public schools. Williams had no interest in broadcasting his reputation as a beneficiary of a bunch of wealthy libertarians’ pet cause. But because so many do view charters favorably, Kenney would also suffer if he were painted as uniformly “anti-charter.”

Nonetheless, education politics have been critical in this election, not the least because they determined the candidates’ institutional and financial support—and because they mobilized one of the more active sectors of the electorate against Williams and for Kenney. Most unions are backing Kenney. But the election has been a special priority for both the embattled Philadelphia Federation of Teachers and the public-schools movement, who wanted, after Mayor Michael Nutter’s lukewarm administration, to make certain that they had a champion in office. Most of all, though, they wanted to make sure that Williams did not win. (The PFT has also been working hard to elect Helen Gym, the city’s most high-profile public schools activist, and a prominent Asian-American rights activist, to one of City Council’s five majority-party at-large seats.)

That the electoral opposition to Williams has not been even stronger is a reflection of the broader state of Philadelphia social movements, which, after years of schools crisis, are still working to translate widespread anger into sustained grassroots mobilization. The PFT has in recent years sought to deepen its connection to its members and strengthen ties to neighborhood, parent, and student organizations, but there is still a surprising amount of indifference and alienation: It is expected to be a low-turnout election.

In a desperate move, Williams tried to dig up nearly two-decade-old comments made by Kenney—truly repugnant comments in which he complained that police “can’t shoot anybody” anymore—to turn the Black Lives Matter movement to his political advantage. Kenney has disavowed those comments and has long since made criminal-justice reform a central part of his political identity. In a city where racial allegiance has long played a major role in elections, Kenney, a white candidate, is poised to take a share of the black vote that Williams, the leading African-American candidate, needs to win.

As voters head to the polls today, Williams’s chance for a victory seems very much in doubt. A colleague recently asked me, “If Williams loses, will the SIG traders, so celebrated for their financial cunning, realize that they have made a bad investment?” It’s a good question. After all, races for City Council and the state Legislature are much cheaper to buy.