We tend to think of democracies dying at the hands of men with guns. During the Cold War, coups d’etat accounted for nearly three out of every four democratic breakdowns. Military coups toppled Egyptian President Mohammed Morsi in 2013 and Thai Prime Minister Yingluck Shinawatra in 2014. In cases like these, democracy dissolves in spectacular fashion. Tanks roll in the streets. The president is imprisoned or shipped off into exile. The constitution is suspended or scrapped.

By and large, however, overt dictatorships have disappeared across much of the world. Violent seizures of power are rare. But there’s another way to break a democracy: not at the hands of generals, but of elected leaders who subvert the very process that brought them to power. In Venezuela, Hugo Chávez was freely elected president, but he used his soaring popularity (and the country’s vast oil wealth) to tilt the playing field against opponents, packing the courts, blacklisting critics, bullying independent media, and eventually eliminating presidential term limits so that he could remain in power indefinitely. In Hungary, Prime Minister Viktor Orbán used his party’s parliamentary majority to pack the judiciary with loyalists and rewrite the constitutional and electoral rules to weaken opponents. Elected leaders have similarly subverted democratic institutions in Ecuador, Georgia, Peru, the Philippines, Poland, Russia, Sri Lanka, Turkey, Ukraine, and elsewhere. In these cases, there are no tanks in the streets. Constitutions and other nominally democratic institutions remain in place. People still vote. Elected autocrats maintain a veneer of democracy while eviscerating its substance. This is how most democracies die today: slowly, in barely visible steps.

How vulnerable is American democracy to such a fate? Extremist demagogues emerge from time to time in all societies, even in healthy democracies. An essential test of this kind of vulnerability isn’t whether such figures emerge but whether political leaders, and especially political parties, work to prevent them from gaining power. When established parties opportunistically invite extremists into their ranks, they imperil democracy.

Once a would-be authoritarian makes it to power, democracies face a second critical test: Will the autocratic leader subvert democratic institutions or be constrained by them? Institutions alone are not enough to rein in elected autocrats. Constitutions must be defended—by political parties and organized citizens, but also by democratic norms, or unwritten rules of toleration and restraint. Without robust norms, constitutional checks and balances do not serve as the bulwarks of democracy we imagine them to be. Instead, institutions become political weapons, wielded forcefully by those who control them against those who do not. This is how elected autocrats subvert democracy—packing and “weaponizing” the courts and other neutral agencies, buying off the media and the private sector (or bullying them into silence), and rewriting the rules of politics to permanently disadvantage their rivals. The tragic paradox of the electoral route to authoritarianism is that democracy’s enemies use the very institutions of democracy—gradually, subtly, and even legally—to kill it.

The United States failed the first test in November 2016, when it elected a president with no real allegiance to democratic norms. Donald Trump’s surprise victory was made possible not only by public disaffection but also by the Republican Party’s failure to keep an extremist demagogue from gaining the nomination.