Wisconsin's election for a state Supreme Court seat is headed for a recount, with a razor-thin margin separating the candidates.

The race – which in recent weeks became a proxy referendum for how voters feel about Gov. Scott Walker (R) and his anti-union actions – drew a record number of voters for this sort of election.

And voters are clearly divided. On Wednesday afternoon, unofficial results had Assistant Attorney General JoAnne Kloppenburg just 311 votes ahead of incumbent Justice David Prosser, with 99 percent of precincts reporting. That's a margin of less than 0.02 percent. Meanwhile, the 33 percent voter turnout shattered the 20 percent prediction that the state’s elections board had predicted.

“It shows that the electorate is aroused, but it shows that it’s a polarized electorate in the state, both sides of which turned out in exceptionally high numbers,” says Charles Franklin, a political science professor at the University of Wisconsin in Madison.

Just a few months ago, Justice Prosser was considered largely a shoo-in in the Wisconsin Supreme Court election. A former Republican speaker of the Assembly, he was a two-term justice seeking reelection in a state that has voted out an incumbent justice only once in the past 40 years. He got 55 percent of the vote in February’s nonpartisan primary, while Ms. Kloppenburg, his closest opponent, got 28 percent.

But then the Wisconsin budget battle happened, and Governor Walker’s bill outlawing collective bargaining for public employees – among other anti-union measures – unleashed a torrent of anger on both sides of the political aisle. The legislation, which eventually passed despite Democratic senators fleeing across state lines to avoid a vote, has sparked recall efforts of both Republican and Democratic lawmakers and is in the midst of a court challenge. And it will probably end up before the state’s Supreme Court.

Even though the court is likely to hear the case before Aug. 1, when the victor in the current election would be seated, both Republicans and Democrats called the election crucial for their agenda, and they spent enormous amounts to mobilize voters.

According to New York University’s Brennan Center for Justice, which tracks spending on judicial races, outside groups had spent a record $3.5 million on the race through Monday.

Recounts in Wisconsin are not automatic, and candidates have three days after the official results are released to request one. But with such a close margin, a recount seems all but certain.

The current Supreme Court in Wisconsin is conservative and has been widely characterized as having a 4-to-3 split – a makeup that would shift if Kloppenburg prevails over Prosser. In reality, says Professor Franklin, one of the three “liberal” justices in that tally is as likely to vote with the conservative majority as with the more liberal one. So a Kloppenburg victory would probably make the court more of a true swing court.

Wisconsin for years was considered a swing state, voting for both Al Gore in 2000 and John Kerry in 2004 by less than a 1 percent margin. Then in 2008, Barack Obama won by 14 points, and all major state governmental branches were controlled by Democrats. In 2010, it shifted again, electing a Republican governor and Republican Legislature.

“Yesterday’s results show that even – or maybe because of – this really heightened conflict we’re in right now, those very close 2000 and 2004 elections are more indicative of the state than either Obama’s win in 2008 or the GOP’s win in 2010,” says Franklin. “We’re in for no clear mandate for either side, and a lot of hard-fought battles.”