MADISON, Wis. (AP) — Thousands of Wisconsin voters waited hours in line to cast ballots and the National Guard staffed overcrowded polling stations on Tuesday, straining the state’s ability to hold a presidential primary election under the lash of an escalating pandemic.

At the same time, many voters said they did not receive their requested absentee ballots and, unwilling to violate a stay-at-home order to vote in person, accepted their votes would not be counted.

“We have moved forward with an election, but we have not moved forward with democracy in the state of Wisconsin,” warned Neil Albrecht, executive director of the Milwaukee election commission.

READ MORE: Could the coronavirus reshape America’s social safety net?

The state’s largest city opened just five of its 180 traditional polling places, forced to downsize after hundreds of poll workers stepped down because of health risks. The resulting logjam forced voters to wait together in lines spanning several blocks in some cases. Many did not have facial coverings.

The chaos in Wisconsin, a premiere general-election battleground, underscored the lengths to which the coronavirus outbreak has upended politics as Democrats seek a nominee to take on President Donald Trump this fall. As the first state to hold a presidential primary contest in three weeks, Wisconsin becomes a test case for dozens of states struggling to balance public health concerns with voting rights in the turbulent 2020 election season.

Joe Biden hopes the state will help deliver a knockout blow against Bernie Sanders in the nomination fight, but the winner of Tuesday’s contest may be less significant than Wisconsin’s decision to allow voting at all. Its ability to host an election during a growing pandemic could have significant implications for upcoming primaries and even the fall general election.

Polls were scheduled to close at 8 p.m. CDT, although results were not expected Tuesday night. A court ruling appeared to prevent results from being made public earlier than next Monday.

Democrats in and out of Wisconsin screamed for the contest to be postponed, yet Republicans — and the conservative-majority state Supreme Court — would not give in. There were particular concerns that minority voters, who tend to live in the areas with the most significant wait times and the highest health risks, were disproportionately affected.

The fight over whether to postpone the election, as more than a dozen states have done, was colored by a state Supreme Court election also being held Tuesday. A lower turnout was thought to benefit the conservative candidate.

Lest there be any doubt about the GOP’s motivation, Trump on Tuesday broke from health experts who have encouraged all Americans to stay home by calling on his supporters to show up for the conservative judicial candidate.

“Wisconsin, get out and vote NOW for Justice Daniel Kelly. Protect your 2nd Amendment!” Trump tweeted.

Sanders said that holding the election was “dangerous” and “may very well prove deadly.” He did not encourage his supporters to vote in person. Biden has largely avoided discussion of the Wisconsin contest in recent days, instructing his supporters only to “follow the science.”

Wisconsin had reported nearly 2,500 coronavirus infections and 77 related deaths as of Monday night.

The unprecedented challenge created a chaotic scenes across the state — and a variety of health risks for voters and the elected officials who fought to keep polls open.

They included Robin Vos, the Republican speaker of the state Assembly, who joined more than 2,500 National Guard troops dispatched to help staff voting stations. While many voters stranded in lines for more than an hour did not have any protective equipment, Vos donned a face mask, safety glasses, gloves and a full protective gown.

In Madison, city workers erected Plexiglas barriers to protect poll workers, and voters were encouraged to bring their own pens to mark the ballots.

State GOP Chairman Andrew Hitt downplayed the health concerns: “This isn’t New York City.”

He noted that Wisconsin residents are still going to the grocery store, the liquor store and even boating stores classified as essential businesses. “I can’t really think of something more essential than voting,” he said.

As of midday Tuesday, most voting sites in Milwaukee were reporting wait times between one-and-a-half to two-and-a-half hours, according to Albrecht. Lines stretched several blocks outside buildings as workers tried to maintain social distancing recommendations that everyone stand at least six feet apart.

Tens of thousands of voters who received absentee ballots had not returned them as of Tuesday, Albrecht said, noting that his office received hundreds of calls from people who didn’t get an absentee ballot or were concerned theirs hadn’t been delivered to election officials.

On the eve of the election, it was unclear whether in-person voting would happen at all.

Wisconsin Gov. Tony Evers issued an executive order Monday afternoon to postpone the election. Less than four hours later, the state Supreme Court sided with Republicans who said Evers didn’t have the authority to reschedule the race on his own.

Conservative justices on the U.S. Supreme Court quickly followed with a 5-4 ruling that overturned a lower court’s decision expanding absentee voting.

Evers himself had questioned whether he had the power to reschedule the election, but said the worsening situation, including an increase in COVID-19 deaths, made clear there was no way to safely move forward. The first-term Democrat said he sought the delay because he was motivated by protecting public health, not politics.

READ MORE: How the outbreak’s economic disruption is impacting renters

With the U.S. Supreme Court decision, voters were given no extra time for absentee voting. The court said absentee ballots must be hand-delivered by Tuesday evening or postmarked by Tuesday, although they can arrive at clerks’ offices as late as Monday. Wisconsin election officials said the high court’s order left intact a provision of the lower-court order that no returns be reported until that day.

Meanwhile, voters shared what one called an “eerie” experience at the polls.

Christopher Sullivan, a 35-year-old high school business teacher from western Wisconsin, said two police officers greeted voters outside of his polling site in Holmen. Inside, two members of the county health department instructed him to wash his hands in a makeshift sink.

In another room, Sullivan was told to take one of the pens on a table spaced 6 inches apart and not give it back. He was given his ballot by “an elderly lady wearing a mask and gloves sitting behind a glass wall.”

“I have voted many times in my life (and at this location) and have never experienced something so eerie,” said Sullivan, who leans Democratic and voted for Sanders on Tuesday. “Because it is this unsafe to vote, maybe we should have postponed the election or done mail-in ballots.”

He said he was “ashamed to be from Wisconsin today.”

Peoples reported from Montclair, New Jersey. AP writers Gretchen Ehlke and Carrie Antlfinger in Milwaukee, and Amy Forliti in Minneapolis contributed.