When the polls closed on Nov. 5, 2019, the initial count showed the governor of Kentucky, Republican Matt Bevin, losing to his Democratic challenger, Andy Beshear. But rather than concede that he fell short in what should have been an easy reelection, Bevin claimed that “irregularities” had muddled the result — though he produced no evidence to support his accusations. At first, some Kentucky legislative leaders appeared to back him, and some pointed to the legislature’s power to resolve an election dispute and choose the governor regardless of the vote. But Bevin was not popular even within his own party, and eventually, he had to concede when the local GOP did not go along with him.

We could imagine a similar scenario this November: What would happen if President Trump had an early lead that evaporated as votes were counted, and then he refused to concede? The idea isn’t too far-fetched; Trump has raised it himself. Before the 2016 election, he wouldn’t agree to accept the results if he lost. After winning in the electoral college but losing the popular count by about 3 million votes, Trump claimed — with no evidence whatsoever — that at least 3 million fraudulent votes had been cast for his opponent, Hillary Clinton. He set up an “election integrity” commission headed by then-Kansas secretary of state Kris Kobach to try to prove that “voter fraud” is a major problem. But after the commission faced attacks from the left and the right for demanding state voter records with an apparent plan to use them to call for stricter registration rules, Trump disbanded it, with no work accomplished. In 2018, the president criticized elections in Florida and California, where late-counted votes shifted toward Democrats, suggesting without evidence that there was foul play.

It’s not just Trump who might not accept election results. Imagine that he wins in the electoral college, this time thanks to what Democrats believe is voter suppression in Florida. The Florida legislature and governor have already sought to stymie Amendment 4, a 2018 ballot initiative to restore voting rights to formerly incarcerated felons. When the state Supreme Court agreed that felons could not register to vote until paying all their outstanding fines, Gov. Ron DeSantis (R) praised the ruling and called voting a “privilege,” rather than a right. Some Democrats have called the new rules a “poll tax,” and a Florida public TV station concluded that “the implications of the bill passed by a majority-Republican legislature preventing former felons from voting could work to ensure Trump wins the 2020 presidential election.” During Trump’s impeachment trial this past week, Rep. Adam Schiff (D-Calif.) said that “we cannot be assured that the vote will be fairly won” in November because of the allegations that Trump was trying to “cheat” by pressuring Ukraine to announce an investigation into Joe Biden and his family.

External forces could cause an election meltdown, too. A recent NPR-News Hour-Marist poll found that “almost 4 in 10 Americans . . . believe it is likely another country will tamper with the votes cast in 2020 in order to change the result.” What if Russians hack into Detroit’s power grid and knock out electricity on Election Day, seriously depressing turnout — and Trump wins the electoral college because he carries Michigan? Most states do not have a Plan B to deal with a terrorist attack or natural disaster affecting part of a presidential election.

The vote this year is particularly vulnerable to a crisis of legitimacy because Americans’ trust in elections is already low; that NPR poll found that only 62 percent of Americans think our elections are fair. A number of factors are contributing to this worrisome trend.

Republicans have passed laws and procedures aimed at suppressing the votes of Democrats, based on unsupported claims of voter fraud. Under Kobach’s watch, for example, Kansas passed a law requiring people registering to vote to produce proof of citizenship, such as a birth or naturalization certificate. About 30,000 people had their registrations suspended or canceled for failure to show their papers until a federal court put the program on hold. Kobach defended the law in court in 2018, citing a handful of cases of noncitizen voting as the “tip of the iceberg” and claiming that the law would deter many more. But at trial in a suit brought by the ACLU, U.S. District Judge Julie Robinson concluded there was no iceberg, merely an “icicle.” Kobach’s presentation of evidence was so faulty and deceptive that he was sanctioned twice by the courts.

Time and again, courts and scholars have debunked the myth of widespread voter fraud — but such claims still lead Republicans to believe that Democrats are cheating, and they prompt GOP-backed laws that lead Democrats, in turn, to believe that Republicans are cheating.

Yes, a few election administrators are incompetent, and in very close races, when procedures are put under a microscope during recounts and challenges, attention is focused on these weak links. Think of Brenda Snipes, the Democratic former election supervisor in Broward County, Fla., who presided over a series of mishaps during her tenure. In 2004, her office failed to deliver 58,000 ballots to absentee voters who had requested them. In 2012, election workers discovered almost 1,000 uncounted absentee ballots in county offices a week after the vote. In 2016, Snipes’s office left a voter initiative on medical marijuana completely off some ballots. In the recount in the 2018 Senate race between Sen. Bill Nelson (D) and Gov. Rick Scott (R), Snipes’s office missed — by two minutes — a key deadline because county officials did not know how to submit the vote totals to the state online. This error came after a faulty ballot design apparently caused many Broward voters to skip voting in the Senate contest entirely.

Snipes is not alone. Then-Georgia Secretary of State (and now governor) Brian Kemp engaged in one of the most despicable moments in modern American politics in 2018, when he wrongly accused Democrats of hacking into state voter registration databases (and posted the charges on the front page of the official secretary of state website the weekend before the election) to cover up his own failure to secure voters’ private data.

Incompetent administrators come from both parties, but election problems tend to get the most notice in big cities, where there are more voters and more media attention — and more votes for Democrats. Big blunders sometimes lead to Republican charges of intentional vote tampering. It is no surprise that Trump called out Snipes during the 2018 recount, accusing her, again without evidence, of cheating to help fellow Democrats.

Recent elections have also seen both high-tech and old-fashioned dirty tricks used with uncomfortable frequency. In the 2017 U.S. Senate special election in Alabama, left-leaning groups backing Democrat Doug Jones (but working independently) used social media ma­nipu­la­tion — based on Russian tactics from 2016 — to target Republican Roy Moore. One of these efforts, “Dry Alabama,” involved inventing a pro-Moore Baptist group that supported a statewide ban on alcohol. One of the people behind the fake group told the New York Times that he hoped Dry Alabama’s hardcore anti-alcohol message would depress turnout among moderate Republicans.

The 2018 race in North Carolina’s 9th Congressional District saw straight-up ballot tampering: Evidence of improper tactics by consultant Leslie McCrae Dowless to support the Republican candidate, Mark Harris, was so overwhelming that the bipartisan North Carolina Board of Elections voted unanimously to order a new election unmarred by fraud. Trump, who speaks nonstop about nonexistent Democratic voter fraud, has remained mostly silent about North Carolina.

Finally, we have seen a rise in incendiary rhetoric about stolen elections. At an October 2016 campaign rally in Ambridge, Pa., Trump told an enthusiastic, mostly white crowd that it is “so important that you watch other communities, because we don’t want this election stolen from us.”

In 2018, Sen. Sherrod Brown (D-Ohio) claimed that if Democrat Stacey Abrams lost the Georgia governor’s race, it would be because Kemp “stole” it. It is true that Kemp was an incompetent and malevolent secretary of state who was supervising the election in which he was running. But there was no good evidence that his actions changed the outcome of the election, which he won. Abrams nonetheless has refused repeatedly to call Kemp the “legitimate” governor of Georgia.

The combination of these four factors — Republican voter suppression, pockets of incompetence, dirty tricks and increasingly outrageous language about stolen elections — creates a volatile mix in our hyperpolarized era.

Unfortunately, we don’t have any good short-term fixes available between now and November. It’s not clear that we can rely on responsible leaders of both parties to assure democratic transitions and acceptance of election results. Republican responses to the impeachment hearings’ evidence that Trump encouraged foreign interference in the 2020 elections are not encouraging. Many contested elections wind up in the courts: According to figures I’ve compiled for my new book, “Election Meltdown,” election litigation has nearly tripled since 2000, with the highest number of cases occurring in the most recent national elections, in 2018. But the Supreme Court itself is polarized, and it is not certain that Democrats would accept a decision by a Republican-majority court handing yet another presidency to a Republican.

There are about nine months until Election Day. Some concrete steps could help minimize the chances of a meltdown, since we can’t do much to fix problems after they occur. For example, journalists could be more careful not to “call” states for presidential candidates until they are absolutely sure enough votes have been counted that the outcome is clear. Social media companies could ban “deep fake” videos that are not labeled as manipulated. Government cybersecurity experts do more to thwart unusual ways of disrupting the voting process, such as attacks on the power grid. And election officials need to have a Plan B in the event of attacks on registration or voting systems. External and internal forces that seek to foment discord are not resting. We can’t, either.

CORRECTION: An earlier version of this story misspelled the name of the former governor of Kentucky. He is Matt Bevin, not Matt Bevins.

Twitter: @rickhasen