As COVID-19 spreads throughout the United States, forcing the cancellation of countless mass gatherings, lawmakers are struggling to decide what to do about upcoming elections. Four other states will still go to the polls on Tuesday, but Louisiana has postponed its April primary to June, under the optimistic assumption that everything will go back to normal by then. But what if, as many scientists predict, coronavirus spreads widely through the spring and summer? And what if, come November, the nation is still in the grips of a pandemic? Could Donald Trump simply cancel the 2020 presidential election?

The answer is no: Congress, not the president, has the power to move Election Day. And even if Congress did postpone the vote, the Constitution would terminate Trump’s term on Jan. 20, 2021. If Trump sought to cancel the election and remain in office past that point, then, he would require not just a congressional act but a constitutional amendment. That scenario is extremely improbable.

If the pandemic gets so severe that we cannot responsibly hold in-person elections, Congress should require states to allow no-excuse absentee balloting. But if Trump does not want to risk a loss at the polls, he can exploit a constitutional shortcut around free and fair elections. The president can ask Republican-controlled state legislatures to assign their electoral votes to him—without allowing any citizen to cast a ballot for president. This maneuver would constitute an appalling assault on democracy. But it would be legal.

As the 2016 election reminded the country, the president is chosen by the Electoral College, not the popular vote. There are 538 electors, and a candidate needs 270 of them to win. Currently, every state assigns electors to the candidate who won the popular vote statewide. (Two states add a twist that’s irrelevant here.) But the Constitution does not require states to assign their electors on the basis of the statewide vote. It does not even require a statewide vote. Rather, it explains that each state “shall appoint” its electors “in such manner as the Legislature thereof may direct.” In other words, each state legislature gets to decide how electors are appointed—and, by extension, who gets their votes.

Today, every state legislature has delegated this task to the people. But at first, state legislatures just did it themselves. In the first presidential election, for instance, the legislatures of Connecticut, Delaware, Georgia, New Jersey, and South Carolina appointed electors directly. Eventually, every state moved toward the modern system. But the Supreme Court confirmed in 1892’s McPherson v. Blacker that states were free to revert to the old method, and in 2000’s Bush v. Gore, the court reiterated this point. The majority declared that the state legislature “may, if it so chooses, select the electors itself,” and retains authority to “take back the power to appoint electors” even after switching to a statewide vote.

Put simply, it is perfectly constitutional for a state legislature to scrap statewide elections for president and appoint electors itself. It would also be constitutional for a state legislature to disregard the winner of the statewide vote and assign electors to the loser. And because the Constitution grants legislatures the authority to pick electors this way, Congress cannot stop them.

Due in part to partisan gerrymandering, Republicans control the legislatures of 28 states. Collectively, these states have 294 electoral votes. Trump himself could not cancel the entire presidential election. But he could ask these GOP-dominated legislatures to cancel their statewide presidential elections and assign their electors to him. It’s doubtful that we will face this situation in November. But imagine a worst-case scenario: The election is approaching, and the coronavirus remains rampant in our communities. States are unsure whether they have the personnel and resources to hold an election. Congress has failed to mandate no-excuse absentee balloting, and many states have declined to implement it. Or the postal service is so hard hit that it cannot reliably carry ballots to and from voters’ residences. It’s not difficult to envision Trump’s allies in state legislatures assigning their states’ electoral votes to the president, insisting that these dire circumstances justify pulling a constitutional fire alarm.

There is one catch. This scenario presumes that state legislature have the power not only to pick electors, but also to direct them to vote for a specific candidate. States have long exercised this control over electors’ votes. But the Supreme Court will soon hear two cases brought by electors who assert that they have a constitutional right to vote for whomever they wish. They assert that state legislatures can appoint electors—the human beings themselves—but cannot then require them to vote for a particular candidate, or punish them if they do not. It seems unlikely that the court will grant “faithless electors” the ability to buck state legislatures and cast rogue votes. If the court does give electors this right, however, the entire system will be thrown into chaos. Statewide votes would become largely meaningless, because the 538 electors could “vote their conscience” no matter what the state legislature demands.

Let’s assume, though, that SCOTUS will not burn down the current system, and the court allows states to exercise their traditional authority to assign electors to candidates. This system permits legislatures to cancel or ignore the statewide presidential election and effectively decide the election. That shortcut to reelection would be profoundly anti-democratic. But so is the Electoral College itself, and we are still living with its consequences. Until both Republicans and Democrats agree to amend this Rube Goldberg machine out of the Constitution, it will remain a tool for autocrats to wield when they fear the majority has turned against them.