The state of Wisconsin plans to hold an election on Tuesday, April 7, a vote that will include a Democratic presidential primary and an election for a seat on the state Supreme Court.

Yet, due to the web of laws governing absentee ballots in that state and the unique constraints imposed by the coronavirus pandemic, the election was on track to be a debacle. Tens of thousands of voters were likely to be disenfranchised by laws imposing obstacles on voters who cannot leave their homes to go to the polls.

On Thursday afternoon, however, a federal court handed down a decision lifting some of these obstacles. Judge William Conley’s opinion in Democratic National Committee v. Bostelmann is not a panacea for voters struggling to exercise the franchise in an age of social distancing. But it does block what is probably the biggest obstacle to the right to vote in next week’s election.

Like many state governors, Gov. Tony Evers (D-WI) issued a stay-at-home order a week ago, hoping to slow the spread of coronavirus. State officials, meanwhile, have received a crush of absentee ballot requests from voters hoping to vote by mail. As Judge Conley notes in his opinion, the state has received at least 1,119,439 such requests. Meanwhile, “in the four spring elections from 2016 to 2019, the number of absentee ballots issued ranged from a low of 103,533 in 2017 to a high of 249,503 in 2016.”

Faced with so many requests, state officials have struggled to mail out ballots fast enough for voters to actually make use of them. Worse, a state law required the state to discard any ballot that did not arrive by 8 pm on Tuesday, April 7. As a result, it would literally be impossible for thousands of voters to receive their ballot, fill it out, mail it, and then have the postal service deliver that ballot before the deadline.

According to the state’s election administrator, “approximately 27,500 voters’ absentee ballots will be received after the receipt deadline of 8:00 p.m. on the day of the election, April 7, 2020, and, therefore, will not be counted.”

Judge Conley’s order mitigates this problem by extending the deadline for ballots to arrive to 4 pm on April 13. Conley also extended the deadline for voters to apply for an absentee ballot by one day — voters now have until 5 pm on April 3 to make such a request “by mail, fax or email (and if deemed administratively feasible in the sole discretion of the [election] Administrator, online).”

That takes care of one problem. A separate problem is that Wisconsin law requires absentee voters to have someone other than the voter sign the ballot as a witness. This provision potentially disenfranchises voters who live alone, and who may not be able to make use of a witness during a period of social distancing.

Conley did not block this requirement entirely — most voters will still need to have their ballots signed by a witness. But he also ordered the state “to accept an unwitnessed ballot that contains a written affirmation or other statement by an absentee voter that due to the COVID-19 pandemic, he or she was unable to safely obtain a witness certification despite his or her reasonable efforts to do so, provided that the ballot is otherwise valid.”

This is not a perfect solution. Among other things, it is unclear how voters are supposed to learn about Conley’s order when they are alone and at home. Moreover, Conley ruled that “it will be left up to the individual discretion of [election] clerks as to whether to accept a voter’s excuse for not completing the witness certification requirement based on the written affirmation by the individual voter.” It is likely that at least some voters will be disenfranchised by overzealous clerks.

Nevertheless, Conley’s opinion is heavy with the judge’s own knowledge that he can only push so far — Conley rejected a request to delay the election entirely. He also left in place a state law requiring absentee voters to provide a copy of their photo ID, a law strongly favored by the Wisconsin Republican Party (though, as Conley also notes, many voters may be already be exempt from this requirement under a provision allowing voters who are “indefinitely confined” to vote without an ID).

If the state or the state GOP decides to appeal any part of Conley’s order, that appeal will be heard by the United States Court of Appeals for the Seventh Circuit, which is dominated by Republicans. And any decision by the Seventh Circuit may be reviewed by a GOP-dominated Supreme Court that is generally very unsympathetic to voting rights plaintiffs.

Although there is little time remaining before Tuesday’s election, it’s possible that either the state or the state’s Republican Party will seek an emergency stay of Conley’s order from the Seventh Circuit or the Supreme Court.

Barring such a stay, however, Conley’s order is likely to govern Tuesday’s election. While Conley’s decision is not the ideal remedy for many Wisconsin voters, it is also likely to rescue tens of thousands of voters from disenfranchisement. And it will potentially prevent an election where voters lose their right to vote based on arbitrary factors like how quickly the postal service delivers their ballot.