By declining to commit to a peaceful transfer of power, President Trump has agitated many who fear he will refuse to leave office even if he loses the November election — and may even resort to violence. The terrifying reality is that there are also several mechanisms that are legal and constitutional that could enable Trump to stay in office without actually winning the vote.

The system of electing the president is complicated because it was not designed to be directly democratic. The Constitution calls for states to choose the presidential electors, who in turn gather to vote for the president. Over time, states have passed laws that ensured their state’s popular vote for the presidency would determine the electors. But those are laws, not a constitutional obligation.

Now, imagine the scenario during election week: Trump is leading on Nov. 3, but Democratic nominee Joe Biden gains ground in the days following. Republicans file objections to tens of thousands of mail-in ballots. Democrats file countersuits. Taking account of the confusion, legislatures decide to choose the electors themselves.

Here’s the worry. Of the nine swing states, eight have Republican legislatures. If one or more decide that balloting is chaotic and marred by irregularities, they could send what they regard as the legitimate slate of electors, which would be Republican.

Democrats may object and file lawsuits. In some of those states, Democratic governors or secretaries of state could send their own slates of electors to Washington. That would add to the confusion, but that might well be part of the Republican plan. When Congress convenes on Jan. 6 to tally the electors’ votes, there would be challenges to the legitimacy of some electors. Congressional Republicans would agree that disputed states should not be counted. That would ensure that neither candidate would get to 270 electoral votes.

At that point, the Constitution directs that the House of Representatives vote to determine the presidential election. But it does so with each state casting a single vote. If the current numbers hold, there would be 26 state delegations that are Republican and 23 Democratic (with one tied), so the outcome would be to reelect Trump. Trump does not need to do anything other than accept this outcome, which is constitutional. (Hat tip to Tom Rogers and Tim Wirth for their writings on this topic.)

Trump clearly understands this chain of events. He has been casting doubt on mail-in ballots for months, insisting that the results must be the ones that reflect the tally on election night. He said this week that without mail-in ballots, there would be no worries about a transfer of power because there would simply be a continuation of his rule. He has also acknowledged that “at a certain point, it goes to Congress.”

For this scenario to play out, state Republican parties have to put their desire to win above concerns that all voices are heard. Unfortunately, recent history suggests that most will readily make this trade.

Many state Republican parties have been actively attempting to suppress votes. Just a few examples: In 2011, Texas passed a law requiring a government ID for voting, and allowed gun licenses but not student IDs from state universities. Ostensibly, this was to prevent voter fraud, which several studies have shown is largely nonexistent. In 2017, Georgia passed a law blocking voter registrations with minor typos, which mainly affected Black voters. In Florida, the Republican governor and legislature have effectively gutted a state initiative that restored voting rights to more than 1 million former felons, disproportionately Black.

American democracy is getting warped because the Republican Party believes its path to power lies not in getting a majority of the votes but through other means. In 2018, thanks to redistricting, Republicans in Wisconsin, having won about 45 percent of the vote, ended up with almost 65 percent of the seats in the state assembly. They have become used to this kind of situation on the national stage. Since 1992, the Republican presidential candidate has won the popular vote only once — in 2004, in the wake of the country’s worst terrorist attack and with a wartime “rally around the flag” sentiment. Nevertheless, Republicans have held the White House for almost half of those 28 years.

The United States prides itself as the world’s leading democracy. And yet, because of a vague and creaky constitutional process and ferocious partisanship, this November we might put on a display of democratic dysfunction that would rival any banana republic on the planet.

Read more: