Update: Less than 24 hours before the primary was to be held, Wisconsin’s governor paused it. Republicans, who control the legislature, have challenged it to the state Supreme Court because state law requires the legislature to reset the date. And on Monday night the Supreme Court said the primary must go on.

The mess in Wisconsin as state officials decide to go ahead with their presidential primary and local elections on Tuesday underscores what uncharted territory we are in with a pandemic raging in an election year.

There’s no good way for any state to handle this: Do you postpone a primary? Or hold it in the midst of a global crisis? The most obvious solution, vote by mail, doesn’t come easy.

Wisconsin, the only state going forward with an in-person election in April, is on its way to becoming the example of the perils. A day before their primary for presidential and local elections, the state’s health board is recommending against in-person voting, yet there is no statewide absentee mail-ballot effort, there are not enough poll workers, and there are dueling court cases sowing confusion about absentee ballots, and could at worst result in tens of thousands of them not being counted.

Here’s what went so wrong in Wisconsin.

There, like in many states, a governor cannot decide to move the primary himself or herself. They need the state legislature to weigh in. For reasons that mystified Democrats in his state and nationally, Wisconsin Gov. Tony Evers (D) did not ask the Republican-controlled legislature to consider postponing the primary. Instead, he asked the legislature to mail absentee ballots to every voter. And he didn’t officially ask them to do it until two business days before the election, in an emergency special session Friday.

The legislature gaveled in for a few seconds and said no.

Their reasoning is both that in-person voting is safe, and that these elections can’t wait. But it’s not a stretch to wonder whether politics is also at play. Republicans in other states, and President Trump, have openly expressed concerns that more voting by mail will increase Democratic turnout. Republicans in Wisconsin have not said that, but they do have a competitive state Supreme Court election on Tuesday. And Republican lawmakers in Wisconsin have a history of playing politics with elections to benefit their party. Wisconsin is one of the most gerrymandered states, and two years ago, the Republicans in charge tried to move a state legislative election to a different date to help their candidate win.

So then the courts got involved, and within 24 hours flip-flopped on the rules for absentee voting.

Less than a week before the election, voting-rights advocates and the Wisconsin Democratic Party found a receptive ear with a federal judge in Wisconsin. But while he was critical of state politicians for tumbling into an election, he said he did not have the authority to stop it based on public health concerns.

Instead, U.S. District Judge William M. Conley extended the deadline for Wisconsin voters to request an absentee ballot by a day, from Thursday to Friday. He effectively removed a Wisconsin rule for absentee voting that requires a witness. His most controversial decision essentially extended the election by a week, ruling that the results cannot be announced until April 13, which is the new deadline for absentee ballots to be returned. Republicans appealed, and in the span of 24 hours, managed to get a higher court overturn Conley’s decision that voters don’t have to have a witness sign their ballot. That means some ballots that were filled out with the old rules could get thrown in the trash.

All this puts Wisconsin voters in the awkward position of being told to go vote, despite the disapproval from state and federal leaders as well as a federal judge, and no clear guidelines on how to do it.

Election officials are figuring out how to hold it with the few staff who are willing to come to work, one armed with “170 proof sanitizer cooked up by a local distillery,” The Post’s Amy Gardner reports. The state House speaker defied public-health officials’ warnings to avoid crowds and urged people to come help hold the election: “If you’re bored at home and sick of watching Netflix, volunteer to go and help at the polls,” he said.

In his ruling, Conley also left open the confusing possibility that he could invalidate the election if it went forward and groups thought voters were disenfranchised. So voters who risk their health to vote may have to do it all over again?

Then, on Saturday, the Republican National Committee asked the U.S. Supreme Court to chime in and prevent ballots mailed after Election Day from being counted. No word yet on whether they will.

“This is a mess,” Dean Knudson, chairman of the Wisconsin Election Commission, told the Milwaukee Journal Sentinel.

While there are no good options for elections and pandemics, Wisconsin leaders refusing to act early to find a solution and instead holding its polls in the middle of the coronavirus outbreak, amid controversy and confusing rules that change up to the last minute, may be the worst.