If Hurricane Matthew is as devastating to Florida as forecasters have predicted, it could be a human tragedy costing people their lives, health, homes, and personal property. Beyond that initial tragedy, though, the storm also may have dire electoral implications, potentially affecting the outcome of the 2016 presidential election and landing emergency election litigation from Florida once again before the (now-deadlocked) United States Supreme Court.

Florida is seen as a state key to Donald Trump’s chances of victory over Hillary Clinton for the presidency, and this storm could have major impacts on voter registration and voting.

Voter registration in Florida closes in just five days. According to Professor Dan Smith of the University of Florida, in the last five days of registration in 2012, 50,000 Florida voters signed up to vote. Many who might normally sign up to vote at the last minute are now following Florida Gov. Rick Scott’s order to flee the affected areas of the state, and they are not likely to register to vote on their way out or drop ballots in closed post offices or soon-to-be-flooded post office boxes. Hillary Clinton’s campaign has already called for voter registration deadlines to be extended, but the Republican governor has already turned down that request.

Some Floridians who have already registered and wish to cast an early ballot may find that they cannot get home to vote or get an absentee ballot, or perhaps that their ballot has washed away in the storm. Requests to deal with these problems could put a great burden on Florida election administrators, particularly if the storm displaces people for a period that lasts through Election Day. The good news here is that we are still four weeks out from Election Day and that Florida is a state with early voting, and so there is a chance to get some post-storm plans in place to help people as much as possible.

We can also learn much of what post-storm voting could look like from the response to Superstorm Sandy, which hit the Eastern Seaboard in 2012, and caused great damage in New York and New Jersey just before Election Day. According to a study by Professor Robert M. Stein of Rice University, Sandy had a number of negative effects on the election in the impacted regions. Turnout went down. Polling places were consolidated. Jurisdictions differed in how they treated displaced voters. There was confusion and chaos in some affected areas.

Perhaps most disturbingly, some New Jersey jurisdictions relaxed rules for voting on the fly, including allowing voting by fax and by email. These measures violated New Jersey law, and a Rutgers study found that they may even have led to some fraudulent voting.

Just imagine if any of this happens in Florida after Matthew. We already have Donald Trump telling voters that the election is rigged. Any attempt to try to accommodate, or fail to accommodate, voters will be second-guessed, challenged, and likely litigated.

Litigation may begin even before the storm ends, with Democrats pushing to extend registration deadlines in Florida since Gov. Scott has said he will not extend them on his own. Even if Scott gives in and does extend those deadlines, he could be sued on the basis that such an extension is illegal, because it usurps the power of the Florida legislature to set the rules for presidential elections. Florida law gives the governor the power to delay an election, but apparently not to extend registration dates or make other election changes. Any changes in election rules by election administrators, the governor, or courts could be found to be illegal if not passed by the Florida legislature.

If that argument sounds familiar, it is one that surfaced during the disputed 2000 presidential election between Republican George W. Bush and Democrat Al Gore. In that election, a very close margin separated the candidates in Florida, and Florida’s electoral votes determined the outcome of the race.

Gore pushed for deadlines to be extended for a recount of the vote, and one of the arguments that Bush’s lawyers made against that was that under the U.S. Constitution, only the Florida legislature has the power to set the rules for presidential elections. That means Florida administrators, Florida’s governor, and even Florida’s courts would be powerless to change the rules for presidential elections in the state.

The 2000 dispute did not finally settle this question—though it did end the recount and give the election to Bush—and a 2015 Supreme Court case somewhat called into question how narrow the court’s reading of the term legislature might be, but the question is an open one. If such a dispute now were to come to the Supreme Court, it could be hard-pressed to resolve it, with the court potentially dividing 4-4 along partisan and ideological lines. This would appear to give an edge to Clinton, as the Florida Supreme Court tends to lean moderate to liberal, and the United States Court of Appeals for the 11th Circuit has more Democratic-appointed judges.

Still, it would be a terrible perfect storm if the election again came down to Florida, but this time without a Supreme Court majority standing in the wings to end the dispute.

With Trump’s uncertainty about whether he would concede a close election to Clinton, this is a nightmare in the making. Let’s hope, for the sake of Floridians and all of us, that this storm is not as bad as it appears it will be.

Read more Slate coverage of the 2016 campaign.