A basic principle of democracy is that parties have to accept that their opponents are sometimes going to win. Fight the election hard, maybe even bitterly, but at the end of the day, politicians and parties need to accept that their opponents can and sometimes should be able to win elections and wield political power.

If we learned one thing about the Republican Party in 2018, it’s that they don’t seem to believe this anymore.

In the wake of a midterm election where the Republicans lost 40 House seats, Republicans were willing to call perfectly legitimate election results into question simply because they didn’t like the outcome. President Trump spread wild conspiracy theories about “forged” ballots in the Florida Senate race and of undocumented immigrants voting en masse for Democrats in California House contests. We heard similar sentiments from establishment figures like Lindsey Graham, Paul Ryan, and Marco Rubio.

Some state Republicans have even decided to nullify the results of this year’s elections. Last Friday, Wisconsin Gov. Scott Walker signed a bill that seizes key powers from Democratic Gov.-elect Tony Evers, who defeated Walker in November. Michigan Republicans are currently weighing a similar bill, and both are following in the footsteps of North Carolina Republicans, who passed a power-stripping bill after a Democratic victory in the 2016 governor’s race.

These acts go well beyond the normal democratic give and take, where parties battle over the rules of elections at the margins. They violate basic democratic principles, revealing the modern GOP to be a threat to the American political system itself.

Today’s Republicans aren’t ideologically opposed to democracy in the way that, say, fascists and Islamists are. It’s that they care more about power than they do about basic democratic principles and are willing to run roughshod over the latter if it helps them win the former. This Republican attitude is more democracy-indifferent than anti-democratic, reflecting a party so caught up in partisan combat that it can’t recognize the authoritarian road it’s traveling down.

The GOP’s authoritarian streak predates Trump but intersects with his autocratic political instincts. The president’s rhetoric about illegitimate elections is the kind of language that, in some countries, has caused political crises — where a leader who loses an election then refuses to admit defeat. But the institutionalized Republican Party is unwilling to check Trump and in fact backs his play, because he’s on their team against the Democrats.

The result is a mutually reinforcing cycle. Republicans’ indifference to democracy allows Trump to behave in a wild and dangerous fashion; in turn, Republicans defend Trump and further weaken the fundamentals of the democratic system.

This a recipe for a crisis, and 2018 showed us what the most likely flashpoint would be: a Trump defeat in the 2020 presidential election.

The 2018 election and the looming crisis in 2020

An astonishing number of Republicans attacked the legitimacy of the November election in the days and weeks afterward.

Take Florida, where it initially appeared that Republicans had won both the Senate and governor races. As the count went on, it became clear that the election night consensus was premature, and Democrats Bill Nelson and Andrew Gillum were narrowing the margins due to late-counted votes in liberal strongholds like Broward County. The closer the margins got, the more willing Republicans were to cry foul.

Florida Gov. Rick Scott, who was running for Senate, accused Nelson of “clearly trying to commit voter fraud to win this election.” Sen. Rubio accused “Democrat lawyers” of trying “to change the results of the election.” President Trump claimed Democrats were committing “election theft.” Even after the two races were eventually called in the GOP’s favor, some national Republicans — like Sen. Graham — continued to suggest that the Democratic gains in the state were somehow ill-gotten.

In California, where late-counted votes flipped every seat in traditionally Republican Orange County blue, Republicans continue to insist that something fishy happened. Trump was, of course, the bluntest: “The Republicans don’t win, and that’s because of potentially illegal votes,” he claimed without evidence in a mid-November Daily Caller interview.

But he wasn’t alone among leading Republicans. In late November, outgoing House Speaker Ryan claimed that “there are a lot of races there we should have won,” blaming the GOP defeats on allegedly “bizarre” voting and vote-counting procedures in the state.

In New Mexico’s Second Congressional District, Republican candidate Yvette Herrell went on Fox News in mid-November and claimed that there were “over 100 documented complaints” of dubious voting practices in her race. She provided no evidence to back her claim, and the state board of elections certified the race in the Democrat’s favor on November 27. Nonetheless, Herrell has still not conceded; in early December, representatives of her campaign went to a warehouse to look over ballots.

These acts, when all put together, aren’t just the typical sour grapes you hear from a party that lost an election. They show a willingness to call into question the very legitimacy of America’s electoral process.

“These shenanigans will almost certainly undermine trust in our electoral institutions, at least among Republicans,” Steven Levitsky, a government professor at Harvard and co-author (with Daniel Ziblatt) of How Democracies Die, told me. “When politicians and parties are unwilling to accept defeat, democracy is clearly imperiled.”

The threat stems from a root cause identified by Levitsky and Ziblatt in their book: political polarization. In the contemporary United States, being a member of a political party is about more than just what policies you’d like to see implemented. It’s a core part of people’s identity, shaping everything from who they like to spend time with to their sense of self and place in the world. This makes Americans more likely to believe virtually anything that favors their partisan team.

Under these conditions, Republicans suggesting Democrats are stealing elections is profoundly dangerous. If Republican elites like Trump and Ryan say that Democrats have won using illegal votes or shady voting procedures, Republican voters will believe them — and will start believing that Democrats can never win elections legitimately.

“Elections are among the most fragile of our institutions,” says Ziblatt, Levitsky’s co-author and Harvard colleague. “It’s exactly here that the system can easily collapse upon itself, when people don’t accept [election results] as legitimate.”

We first saw the kind of impact Trump’s rhetoric could have in 2016, when the Republican candidate was commonly heard claiming the election would be “rigged” by “millions” of illegal votes cast in Hillary Clinton’s favor. A study in Political Research Quarterly found that Trump voters were considerably less likely to believe that the election would be fair prior to the elections — a gap they suggest is attributable, in part, to Trump’s rhetoric about election rigging. There was real fear that this would lead to Trump refusing to concede to Hillary Clinton in the event of a loss, and that he’d get backing from a considerable number of Republicans in doing so.

Trump’s win obviated these concerns. The study found that, after the election, Republicans magically regained their faith in the fairness of American elections. This is consistent with what political scientists call a “winner effect”: Voters whose preferred candidate wins always see the election as more legitimate than those whose candidate lost.

But imagine if Trump loses to, say, Sen. Kamala Harris or Sen. Bernie Sanders. Republican voters would be primed to accept a Trump claim that the elections are illegitimate. This would precipitate a situation in which Republicans falsely allege fraud and refuse to accept a Democratic victory as legitimate.

Such a possibility represents, for political scientists, a crisis on the horizon.

In 2016, amid the fears about Trump not accepting a Clinton victory, Cornell political scientist Tom Pepinsky looked at two recent examples of countries where major political parties and their supporters had concluded that elections were illegitimate: Thailand and Madagascar. In both cases, the failure of democratic political institutions to resolve a conflict over power led to the military stepping in to resolve the crisis. In Thailand’s case, that meant the military seizing power for itself.

There are huge differences between those two younger, poorer democracies and the United States. But when I recently spoke with Pepinsky about the GOP response to 2018, he sounded worried that Trump and Republicans are acting in a way that resembles a political party in a weak democracy drifting toward authoritarianism.

“What I see that’s similar is that officials who are members of one political party are criticizing electoral procedures based on what they anticipate the outcomes to be,” he says. “That’s an example of something that’s very dangerous, that you can find in authoritarian contexts.”

America has gotten through a legitimacy-threatening electoral event before: the Florida 2000 recount, which many Democrats still believe the Supreme Court stole from Al Gore. But in that case, both Gore and George W. Bush emphasized the importance of respecting the results (at least publicly), working to repair the reputational damage to the system and protect its legitimacy.

Trump, it seems, would not — nor, we learned in 2018, would the rest of the Republican Party. It’s now conceivable that if a Democrat wins a close election in 2020, Republicans as a party will simply refuse to accept the vote count.

“If [Trump] loses a close race, he’ll promote false claims of election fraud, and he’ll still be commander in chief for ten weeks,” writes Seth Masket, a scholar of American politics at the University of Denver.

The historical record on what happens after this kind of rhetoric is not at all comforting.

The GOP assault on democratic procedures

This flirtation with crisis isn’t coming out of nowhere. It emerged out of a number of Republican actions in recent years aimed at unfairly tilting the electoral system in their favor.

Over the past decade and a half, Republicans have shown disdain for procedural fairness and a willingness to put the pursuit of power over democratic principle. They have implemented measures that make it harder for racial minorities to vote, render votes from Democratic-leaning constituencies irrelevant, and even overturn the results of elections wholesale. There hasn’t been a systematic Republican plan to undermine democracy, but rather a series of decision points at which Republicans have made the wrong choice without any real backlash from inside the party.

“This isn’t just about President Trump,” says Ziblatt. “There’s really an assault on electoral fairness, I would say, in Republican-governed states. And it’s really only in Republican-governed states where this has taken place.”

Take voter ID laws. In 2008, four states had strict voter ID laws on the book; by 2018, 10 states had implemented such laws. All of them had Republican legislative majorities at the time of passage. While it’s not clear how large an effect voter ID laws have on turnout, it’s clear that black and Hispanic voters are the most affected.

The partisan intent is quite obvious, and at times openly stated. In 2012, when Pennsylvania’s GOP legislature passed its voter ID law, the statehouse’s GOP leader Mike Turzai spoke openly about the effect on that year’s presidential election. “Voter ID ... is gonna allow Governor Romney to win the state of Pennsylvania,” he bragged.

The spread of voter ID laws illustrates how Republicans have become so comfortable with undemocratic practices at the national level: What starts as legislation in a few GOP-controlled states quickly spreads across the country, becoming, in effect, a part of the party’s national policy agenda.

Take voter purges, a tactic in which state governments go through the voter registration rolls and remove people who haven’t voted recently from the polls. Republicans have come up with strict ways to conduct these purges, which tend to remove voters from Democratic-leaning groups (like young voters and Hispanics) who don’t turn out every year.

In 2015, Ohio passed a law that would set up an automated system for conducting purges, widely expected to routinely and disproportionately remove Democratic voters from the rolls. The Supreme Court upheld the law in a 5-4 partisan vote earlier this year; afterwards, 12 Republican states began considering draft legislation that would implement similar systems.

In addition to making voting harder, Republicans have become willing to restructure the rules of the game such that Democrats’ votes don’t matter nearly as much. Extreme gerrymandering is the most obvious such tactic.

In 2010, Republican strategist Karl Rove wrote an op-ed in the Wall Street Journal advocating a significant Republican push to gerrymander legislative districts after that year’s midterm elections. Rove’s idea manifested as Project REDMAP, a dark-money campaign to support Republican candidates for state legislature and then help them redraw House districts after the 2010 census.

We first saw the results of this years-long process in 2012, when Republicans held the House despite President Obama winning reelection and more Americans voting for Democratic House candidates than Republican ones. But the consequences persist, making it significantly harder for Democrats to win office in places around the country.

In the 2018 election, Republicans won about 50 percent of the US House vote in North Carolina. That translated into 70 percent of House seats due to heavily gerrymandered districts. Wisconsin Democrats won every statewide election in 2018 but did not win majorities in either chamber of the state legislature. Once again, gerrymanders are to blame.

North Carolina Rep. David Lewis, who chaired the state redistricting committee that put together a map so racially contorted that it was struck down in court in 2016, openly professed the power politics behind extreme gerrymandering in a speech on the statehouse floor.

“I think electing Republicans is better than electing Democrats,” he explained. “So I drew this map in a way to help foster what I think is better for the country.”

Democrats aren’t wholly innocent here. Maryland Democrats have also conducted an extreme partisan gerrymander, and New Jersey Democrats proposed a plan that could produce a pretty severe gerrymander in their favor earlier this year. But New Jersey Democrats backed off the plan after criticisms from by the state’s Democratic governor, the head of the National Democratic Redistricting Committee, and national media like the New York Times Editorial Board. There was no such backlash from inside the party when state Republicans proposed any of their far more aggressive plans, illustrating the fundamental asymmetry between the two parties on the importance of democratic values.

Gerrymandering isn’t the only way modern Republicans have tried to nullify Democratic votes. Recent years have seen a more brazen tactic: passing laws that overturn the results of an election that Democrats won.

In 2016, North Carolina voters elected a Democratic governor, Rory Cooper, seemingly breaking the Republican stranglehold on state government. But the state legislature convened a special session, passing a bill that would strip incoming Cooper of key powers — including, most notably, his ability to end Republican control over the state election supervision authorities.

North Carolina Republicans got away with it. Once again, it’s proving a model. Wisconsin Republicans passed a similar bill targeting Governor-Elect Evers in early December, which Gov. Walker so recently signed.

Republicans were explicit about what they were up to in this case, too. During the debate over the bill, Wisconsin Speaker of the House Robin Vos warned Republicans that if they don’t pass the power grab, they “are going to have a very liberal governor who is going to enact policies that are in direct contrast to what many of us believe in.” That “very liberal governor” had of course just been voted in by the people of Wisconsin, presumably to enact the policies he had campaigned on.

Michigan Republicans, meanwhile, are currently currently moving forward with a similar bill to hamstring incoming Democratic Gov.-elect Gretchen Witmer.

Any one of these examples of state-level battles over electoral rules could, on its own, sound like an isolated incident. But when you take a step back and look at the history and spread of these tactics — voter ID laws, voter purges, gerrymandering, election nullification — it becomes clear that the national party is on board.

When one Republican state legislature or elected official pushes the boundaries, others follow. When the Supreme Court’s conservative majority issues a ruling opening the door to electoral law changes that benefit Republicans at the expense of Democrats, Republican legislatures rush to follow suit. Some of the state-level laws, like voter ID and gerrymandering, are openly championed by national Republican leaders and conservative activists.

Throughout it all, there has been no whiff of public criticism from the party’s national leadership or allies in the conservative media. That’s how you get a party that’s willing to indulge Donald Trump and his crisis-precipitating rhetoric about stolen elections.

The twilight of the Republican elites

To head off a looming 2020 crisis, Republican elites need to step back from the brink. Democrats calling out Trump’s penchant for making up fake charges of fraud won’t be enough to convince Republican voters that the election is legitimate. The power of partisanship is such that Republican voters will accept even nakedly false claims from their party if the other choice involves lining up with Democrats.

“It is essential,” says Levitsky, “that other GOP leaders speak out.”

The 2018 Arizona Senate election offered an example of a Republican accepting a close defeat gracefully. On election night, the election between Republican Martha McSally and Democrat Kyrsten Sinema seemed to be going in the Republican’s favor. But as in Florida and California, late-counted votes narrowed the total, eventually giving Sinema a slight edge.

Trump, as usual, tried out his claim of vote rigging — tweeting that there were fake signatures on Arizona ballots and that it might be time to “Call for a new Election” (spelling his).

But this time, key state Republicans didn’t go along with him. Retiring Sen. Jeff Flake, whose seat McSally and Sinema were contesting, tweeted that there was “no evidence” to support Trump’s claims. Republican Gov. Doug Ducey called for every vote to be counted. And most importantly, McSally herself conceded to Sinema immediately after nonpartisan election observers called the race in the Democrat’s favor.

It was an impressive display of unity on the part of leading Republicans (the state Republican party was, as my colleague Dylan Scott notes, an exception). But the fact that this gracefulness is noteworthy at all is depressing: A loser accepting a legitimate defeat is the most basic of behaviors you should expect from a political party in a democratic system.

What’s more, these Arizona Republicans don’t speak for the party overall. Flake is retiring, McSally has been defeated, and Ducey isn’t all that influential nationally. Arizona is the exception, and Trump is the rule.

The result is that the Republican commitments to norms that protect our democracy continue to disintegrate at an alarming pace.

“What we’ve learned a lot in the last couple of years about the nature of democracy is that democratic rules and norms depend on the ability of elites to agree and coordinate on those,” says John Sides, a political scientist at George Washington University. “It matters what choices leaders make, and what choices leaders can get away with.”

For years now, Republicans have gotten away with undemocratic behaviors. The more they’ve been able to do it, the more brazen they’ve become — with Trump being the culmination of this evolution rather than some kind of outlier. We saw in 2018 just how far gone Trump’s Republican Party is: they are willing to baselessly allege fraud and conspiracy after elections they’ve lost. We should be worried about a dangerous, potentially crisis-inducing reprise in 2020.