MADISON, Wis. — Municipal clerks across Wisconsin on Monday were set to start tallying votes from last week’s chaotic presidential primary, a count that was delayed for several days by the legal struggle over whether to postpone the election due to the coronavirus pandemic.

Hours before counting began, 14 Milwaukee-area voters filed a federal lawsuit seeking to force a partial revote to protect the “thousands” of voters they argue were disenfranchised by the turbulent election. The lawsuit named Republican legislative leaders who refused to postpone the election or shift it to all-mail.

Get the latest news about the coronavirus and its ripple effects in Chicago and Illinois in our live blog.

Thousands of voters congregated for hours in long lines on April 7, defying social-distancing guidelines that led to the postponement of primaries in several other states. The U.S. Supreme Court decided on the eve of the election that absentee ballots, requested in record numbers, had to be postmarked by midnight April 7. That overturned a judge’s ruling that had granted a one-week extension, forcing many residents to weigh safety concerns against exercising their right to vote.

Gov. Tony Evers, a Democrat, said Monday before votes were tabulated that the election was “a mess that could have been avoided.”

With a lawsuit filed Monday related to the election, and more expected, Evers said, “At the end of the day this will be resolved in court and then we can move on.”

The election, while unprecedented for Wisconsin, isn’t a factor in deciding the Democratic nominee for the White House. Vermont Sen. Bernie Sanders dropped out of the race the day after Wisconsin’s election, all but assuring former Vice President Joe Biden will lead the party ticket in November. Sanders endorsed Biden Monday.

However, also at stake in Tuesday’s election were hundreds of local offices and a critical state Supreme Court contest that fueled the fight between Democrats and Republicans on whether the election should be held. Democrats accused Republicans of wanting to stick to the election date in part to suppress voter turnout in liberal Milwaukee and Dane counties, improving the conservative candidate’s chances in the court race.

The Wisconsin election crystallized what’s expected to be a high-stakes, state-by-state legal fight over how citizens can safely cast their ballots if the coronavirus outbreak persists into the November election. Democrats are arguing for states to be ready to shift to much greater use of absentee and mailed ballots, while Republicans are raising the specter that such elections could lead to increased fraud.

Many voters complained that they had requested absentee ballots that never arrived, forcing them to choose between sitting out the election or risking infection by voting in person. City officials in Milwaukee, as well as Wisconsin’s two U.S. senators, called on the U.S. Postal Service to investigate the complaints.

The Milwaukee-area voters who filed suit Monday said they could not vote because they had health concerns, problems with the absentee process, or submitted an absentee ballot that didn’t meet the April 7 deadline. Their lawsuit seeks class-action status and a court order to count the votes for others like them.

Separately, Milwaukee’s election commission voted Monday to count at least 390 absentee ballots that arrived without a postmark, had an illegible postmark or had a postmark with no date, the Milwaukee Journal Sentinel reported. Election clerks around the state were wrestling with the same problem, with lawsuits expected to resolve the question. Wisconsin election law had no postmark requirement prior to the Supreme Court ruling injecting one for this election.

Ahead of Monday’s returns, Democrats called on the Republican-controlled Legislature to move Wisconsin’s May 12 special congressional election to an all-mail affair. That’s unlikely given the Legislature’s unwillingness to shift last week’s election, but Democratic Gov. Tony Evers has said he is considering moving the date which he’s already postponed once prior to the COVID-19 outbreak. Rep. Sean Duffy, a Republican, vacated the seat by retirement last year.