Hulton Archive / Heritage Images / Getty / The Atlantic

On Election Day, 1888, approximately one hour after the last vote was cast, four masked men burst into a polling place in Plumerville, Arkansas. Waving pistols and shouting threats, they forced election officials against a wall, seized the ballot box, and disappeared on horseback into the rainy night.

There was nothing random about the heist. Plumerville was a Republican stronghold, a mostly Black town in a mostly white county. The gunmen, all white, were prominent local Democrats, including a deputy sheriff. According to later court testimony, after taking the ballot box, the robbers rode to the nearby Democratic stronghold of Morrilton and burned their prize in a woodstove. When ballots were finally counted, Plumerville’s were not among them. Not long after, the Democratic candidate was declared the winner of Arkansas’s Second Congressional District—which included Plumerville—by just two-tenths of a percent.

A tale of pistol-wielding, horseback-riding outlaws may sound antique. Yet today, American elections are if anything even more imperiled than they were 132 years ago. In the past few weeks alone, President Donald Trump has admitted to sabotaging the Postal Service in an attempt to prevent absentee votes from being counted; explored executive orders to further curb mail-in voting; talked about changing the date of the election; and sent federal forces into cities and states on the flimsy pretense of protecting federal property. “Protecting” federal elections could be next.

Until recently, democracy advocates were mostly focused on the possibility that Trump wouldn’t accept the results of a legitimate election. But now, an equally grave danger has emerged—and one that at this moment seems just as likely: There may not be a legitimate election at all.

While no election is perfectly fair, Lisel Hintz, of the Johns Hopkins School of Advanced International Studies, lists four indicators of a potentially compromised election: manipulation that is “pervasive, systemic, deliberate, and widespread.” Any one of these indicators, she says, should signal to observers that results were compromised. An election won by sabotaging the mail so that likely Democrats’ ballots aren’t counted, or by keeping Democratic voters from the polls via state-sponsored intimidation, would easily have all four.

“A sitting president trying to undermine the postal service so he might win an election is not something that happens in rich, developed democracies,” says University College London’s  Brian Klaas, the co-author of How to Rig an Election. “It’s the kind of thing that happens in post-Soviet countries, sub-Saharan Africa, and the Middle East.” In the language of political science, President Donald Trump is hoping to take America from “self-enforcing democracy”—a system of government in which leaders allow fair elections and accept the results—to “competitive authoritarianism,” in which rulers allow elections, but those elections are neither fair nor free.

The good news, or at least the 2020 version of good news, is that Americans can protect the integrity of their elections without appealing to the better angels of Trump’s nature. Would-be autocrats are unlikely to be persuaded, but they can be deterred. By making it far less likely that stealing an election would work—and far more likely that those who try to would face consequences for their actions—the United States can preserve democracy this year and beyond.

Defending American democracy starts with taking advantage of one of its greatest existing strengths: its decentralized nature. Each state, territory, and district administers its own local contests with near-total independence. The federal government sets certain rules for federal elections; that authority falls to Congress, not the White House. This makes it hard for the president to undermine an election’s integrity, and easier for local officials to uphold it. Already, some states are adding secure drop boxes for ballots, recruiting additional election staff, and finding room in their budgets to ensure that the casting and collection of ballots runs as smoothly as possible during the pandemic. The less chaos that takes place on November 3, the fewer excuses the president will have to interfere with vote counting.

Even in places—including some swing states—where officials are all too happy to help the president undermine the democratic process, individual Americans can do a great deal to protect the integrity of the election. Requesting and casting mail-in ballots as early as possible will reduce the impact of any delays in the Postal Service. People at lower risk for COVID-19 can sign up to work the polls. Lawyers can volunteer to be poll watchers. Citizens can (while obeying local laws) document instances of voter intimidation, creating evidence for future court cases. None of these things will guarantee a fair or free election. But taken together, they could make the difference between an election that’s easy to tamper with and one that is not.

Another way to deter Trump from stealing the election is to set clear standards for election integrity well in advance of voting. Prominent Americans of both parties should come together as soon as possible to create these. Al Gore and George W. Bush, for example, likely don’t agree on exactly how our political process should function. But surely they can agree that blatant manipulations such as delaying the election, deliberately undermining the mail, and announcing a last-minute criminal investigation into an opponent would threaten the integrity of the result.

Clear standards must also be accompanied by transparency, so that the American public can judge for itself whether the election was legitimate or not. Some states, such as Michigan, require a detailed procedural audit that confirms the accuracy of voting-machine numbers, ensures that polling places followed both best practices and state law, and documents incidents involving absentee balloting and ballot security that might indicate election manipulation. All states should conduct similarly thorough audits, and make the results of those audits easily accessible online. A well-run election, coupled with clear standards set in advance and transparency around the procedures that were followed, will reduce the temptation to try to alter the results.

Yet Trump may still try. After all, unlike any president before him, he feels almost no particular affection for the democratic process. This is why there must be clear, severe consequences for any tampering attempt.

These consequences should include legal ones. One possibility, as Michael Bromwich, a former inspector general for the Department of Justice, tweeted about, is that White House staff attempting to subvert the election by drafting executive orders could face criminal penalties. Katie Hobbs, Arizona’s secretary of state, asked her state’s attorney general to examine whether the postmaster general could be held liable under an Arizona law that criminalizes “delaying a ballot.” While it remains to be seen whether any such legal actions would be successful, even the specter of criminal charges might make staffers think twice before engaging in (or failing to report) misconduct. And a successful prosecution would send a powerful signal to future would-be election thieves.

The final, and most important, deterrent to election theft is a consequence that has nothing to do with the courtroom: Would-be autocrats should know that if they “win” an election via blatant manipulation, people will rise up in protest. Widespread civil disobedience is the last resort of a self-enforcing democracy, a way to demand fair and free elections even if a country’s institutions fail to provide them. “The goal of competitive authoritarianism is to get people to just give up,” Lisel Hintz says. The fate of America’s democracy may soon rest on whether its people demand democracy or abandon it.

It’s far too soon to say what will happen in November, but so far, there are good reasons to believe that Americans will choose the former over the latter. According to recent polling, even Republicans who hope Trump wins the election view sabotaging the mail or delaying the election as a bridge too far. Meanwhile, the Trump administration’s recent experiments with state-sponsored violence—tear-gassing peaceful protesters in Lafayette Square or hauling off Portland demonstrators in unmarked vans—have if anything provoked a backlash, sending even more protesters into the streets.

There’s cause for cautious optimism, even in the bleakness that is 2020. As the citizens of Plumerville, Arkansas, would surely remind us, American democracy has always been more fragile than we’d like to admit. From the Jim Crow South to the heyday of big-city political machines, politicians who have been able to undermine the democratic process have proved willing to do so. But despite countless new threats and setbacks, democracy in America has prevailed.

The question facing the United States, then, is not “Could it happen here?” but what can stop it from happening again. The answer is as simultaneously comforting and unsettling as democracy itself: us.

This story is part of the project “The Battle for the Constitution,” in partnership with the National Constitution Center.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.