Updated

A conservative justice has weathered attempts to link him to Wisconsin's governor and a divisive union rights law and won re-election, according to county vote totals finalized Friday.

Tallies from each of the state's 72 counties show Justice David Prosser defeated challenger JoAnne Kloppenburg by 7,316 votes. State election officials said they will wait to declare an official winner until the deadline for Kloppenburg to seek a recount passes. She has until Wednesday to call for one.

A message left with Kloppenburg's campaign wasn't immediately returned.

Kloppenburg faced an uphill fight against Prosser, a 12-year court veteran and former Republican Assembly speaker. But she got a boost in the weeks leading up to the election as her supporters worked to turn anger against Gov. Scott Walker and the union rights law against Prosser.

The law, which Walker wrote, strips most public sector workers of nearly all their collective bargaining rights. It also requires them to contribute more to their health care and pensions, changes that will result in an average 8 percent pay cut.

Walker, a Republican, has said the law is needed to help balance the state budget and give local governments the flexibility they need to absorb deep cuts in state aid. Democrats see it as an assault on unions, which are among the party's strongest campaign allies.

Tens of thousands of people converged on the state Capitol for weeks to protest and minority Democrats in the Senate fled the state in a futile attempt to block a vote in that chamber. The law is currently tied up in the courts and hasn't taken effect. Those legal challenges look destined for the state Supreme Court.

The law's opponents hoped a Kloppenburg upset over Prosser would tilt the court to the left and set the stage for the justices to overturn the measure.

Turnout in the April 5 election shattered expectations. Unofficial returns from election night initially showed Kloppenburg had bested Prosser by 204 votes. Kloppenburg declared victory on April 6, but the next day the Waukesha County clerk announced she had forgotten to save 14,000 votes on her computer. Those new votes tipped the election to Prosser, giving him an unofficial 7,500 vote lead.

The clerk, Kathy Nickolaus, worked for Prosser as a member of the Assembly Republican caucus in the mid-1990s. Democrats have demanded she resign, and authorities launch an investigation into why she didn't immediately report the votes. State election officials are reviewing Nickolaus' operations, but she has refused to step down, saying she made an honest mistake.