As Joe Biden scored a widely expected win in the Wisconsin Democratic presidential primary, a liberal challenger for a state supreme court seat declared victory in an upset hailed by Democrats as boding well for the presidential election in November.

The state supreme court is expected to rule in numerous voting rights cases in the lead-up to November’s election, including a case in which 200,000 voters could be purged from voter rolls. Wisconsin is a swing state that narrowly voted for Donald Trump four years ago.

With most precincts in the state reporting, Judge Jill Karofsky held what looked like an insurmountable lead over the conservative state supreme court justice Daniel Kelly.

In a victory statement, Karofsky thanked supporters and condemned the Republican-led legislature for forcing voters to the polls a week earlier amid the coronavirus outbreak.

The state’s Democratic governor, Tony Evers, had attempted to postpone the election, but he was rebuffed by the Republican-led legislature and the conservative-controlled state supreme court.

“Although we were successful in this race, the circumstances under which this election was conducted were simply unacceptable, and raise serious concerns for the future of our democracy,” Karofsky said in a statement. “Nobody in this state or in this country should have been forced to choose between their safety and participating in an election.”

Biden, the presumptive Democratic presidential nominee, had held a large lead in polls before the vote was held. His main opponent, Bernie Sanders, dropped out of the presidential nominating race the day after the vote. Sanders endorsed Biden’s candidacy in a video chat on Monday.

The results from Wisconsin on Monday were drawn from election day the previous Tuesday, which was marred by long lines of voters forced to go to the polls in person as coronavirus ravaged the country.

Coronavirus fears led to an unprecedented number of requests for absentee ballots in the state, numbering more than 1m, but many voters reported that they had not received ballots by election day.

Democracy advocates raised an alarm of potential mass disenfranchisement, especially for minority voters in the city of Milwaukee. Owing to a lack of poll workers amid the pandemic, the election was conducted with just five Milwaukee polling sites.

A typical statewide election would be conducted with about 180 sites for the city.

Long lines of voters wearing masks and trying to keep their distance from one another materialized nevertheless.

“They could have delayed the election with no problem,” an elderly voter in Madison, Wisconsin, told the Associated Press. “They decided if they can suppress the vote in Milwaukee and Madison, where you have a large minority presence, you can get people elected you want elected. And that’s sad.”

The Wisconsin Democratic party chair, Ben Wikler, blasted what he called the Republicans’ “savage and shameful attempt to suppress votes and steal Wisconsin’s supreme court election”.

“Despite the result, the fact that this in-person election took place was a searing loss for Wisconsin,” Wikler said in a statement. “Today’s results don’t tell us how many people were exposed to coronavirus at polling places, how many were infected, or how many will die. Had justice prevailed, those numbers would have been zero. No one should ever have to choose between their health and their vote, yet Republicans chose to prioritize their own political gain over actual human lives.”

Karofsky’s apparent win could have national implications, with the state supreme court likely to decide multiple cases that could shape the November presidential election in a key swing state. One such case could result in the purge of 200,000 voters from the state’s registration rolls.

Donald Trump strongly endorsed Kelly, tweeting on election day, “Protect your 2nd Amendment!” and “A BIG VOTE!”

In endorsing Biden, Sanders called for Trump’s defeat.

“So today, I am asking all Americans, I’m asking every Democrat, I’m asking every independent, I’m asking a lot of Republicans, to come together in this campaign to support your candidacy, which I endorse,” Sanders said.

“We’ve got to make Trump a one-term president.”