MADISON, Wis.-- A grueling statewide recount concluded Friday that Justice David Prosser defeated challenger JoAnne Kloppenburg to win another 10-year term on the Wisconsin Supreme Court in a race driven by the debate over Republican Gov. Scott Walker's efforts to curb the union rights of the state's public employees.

The recount that began on April 27 ended Friday afternoon after Waukesha County officials finished tallying their last remaining precincts. Unofficial results showed Justice Prosser had 752,697 votes—7,006 more than Ms. Kloppenburg's 745,691.

State election officials plan to meet on Monday to verify the results. Ms. Kloppenburg will then have five days to challenge the results in court.

Ms. Kloppenburg issued a statement Friday before the final results were released saying her campaign would review recount records and decide whether to appeal. The statement said the campaign had uncovered "numerous anomalies and irregularities," but did not elaborate. Her campaign raised concerns early during the recount about finding Waukesha County ballot bags unsealed and bags with identification tags that didn't match inspectors' logs.

Prosser spokesman Brian Nemoir issued a statement saying Waukesha County took the extra time to ensure the recount process was transparent and accurate, leaving Ms. Kloppenburg with no basis for a challenge.

"The time has come to move on, confident in both our electoral system and Justice Prosser's re-election," he said.

Ms. Kloppenburg, a little-known state attorney, began the race as a heavy underdog. Justice Prosser entered the campaign with 12 years' experience on the court and is well-known in conservative circles after a stint as Republican Assembly speaker in the 1990s.

But Ms. Kloppenburg's supporters seized on the anger created by Mr. Walker's efforts to erase nearly all public workers' union rights in Wisconsin. They linked Justice Prosser to Mr. Walker and transformed the race into a referendum on the governor, and her campaign surged into the April 5 election.

At first, it appeared Ms. Kloppenburg had pulled off the upset. Initial results showed she had defeated Justice Prosser by about 200 votes, and she declared herself the winner the day after the election.

The next day, Waukesha County Clerk Kathy Nickolaus announced she had failed to report 14,000 votes. The new votes gave Justice Prosser a 7,316 vote lead.

Ms. Nickolaus's revelation sparked questions about fraud in Waukesha County. Ms. Nickolaus worked for Justice Prosser when he was in the Assembly, and the county board had criticized her handling of past elections and a lack of oversight in her operations. Spurred by the election results, the state Government Accountability Board has launched an investigation into her practices.

Ms. Kloppenburg demanded a recount, as is her right under state law. Counties had to conduct it at their own expense, because the margin was less than half of 1% of the total votes cast.

The operation marked the first statewide recount in more than two decades, and it got off to a fitful start as confused clerks peppered state elections officials with questions.

After a few days, clerks settled into a rhythm and every county except Waukesha finished by May 9, the deadline under state law. Waukesha County officials said they needed two more weeks because Ms. Nickolaus recused herself from counting, and the retired judge who took over chose to meticulously document every anomaly, no matter how trivial, since the county was the epicenter of the controversy.