The unspeakable has happened: Donald J. Trump has been elected president of the United States. The commander in chief, the most powerful man on earth, the supposed leader of the free world is now a man who holds liberal democracy in contempt.

It’s difficult to say what the next years will bring. For all his venom, Trump is no ideologue. He has not worked out a plan for how to subvert American democracy or destroy liberal institutions, if only because he has not much of a plan at all. So there is an outside chance that he will prove to be a surprisingly conventional—or simply a historically ineffective—president.

But that seems unlikely. In my recent work, I have shown that citizens have increasingly turned against liberal democracy, especially in the United States. The traditional checks and balances that are supposed to safeguard our rights are at best imperfect bulwarks against a president determined to amass power. In many countries around the world, the consequences are already visible: Illiberal democracy, a system in which the people rule but the rights of unpopular minorities are routinely violated, is on the march.

And if one thing is clear about Trump, it is that his instincts are deeply authoritarian. The political scientist Juan Linz listed the warning signs long ago. As described by the Harvard political scientists Steven Levitsky and Daniel Ziblatt, they include “a refusal to unambiguously disavow violence, a readiness to curtail rivals’ civil liberties, and the denial of the legitimacy of an elected government.” Trump, they write, passes this anti-democratic litmus test with flying colors:

He has encouraged violence among supporters (offering to pay their legal fees), pledged to jail Hillary Clinton and take legal action against unfriendly media, and suggested that he might not accept the election results. Such acts are unprecedented among major American candidates, but they are precisely the kind of behavior that Linz and other scholars have identified as preceding democratic breakdown in interwar Europe.

Of course, for all we know, Trump may never attack the freedom of the press. He may never order his underlings to commit illegal acts. He may never decide to disobey a ruling by the Supreme Court. He may never manufacture a foreign war to assure himself of re-election. And he may never falsify election results or lock up his political opponents, when all of that won’t suffice.

But all these horrors are now real possibilities. If we are to have any chance of stopping them, we must start to learn the art of resisting a would-be dictator.

That art is difficult to master. It cannot be imported wholesale from other countries or contexts. Even if we learn to excel at it—and we will have to learn on the fly, with no safety net to catch our fall—we might well fail. But there are ordinary times, when the stakes of politics are real yet limited, and then there are extraordinary times, when the most basic questions about the future are up for grabs. A vast majority of Americans have only ever lived in ordinary times. Now, with terrifying suddenness, the survival of the American republic—and of liberal democracy around the world—is in danger. So we need to understand that the stakes are higher than they have ever been in our lifetimes. Doing the right thing over the course of the next four years will demand more sacrifice and greater courage than we could have imagined a few short months ago. Here are some initial thoughts—still far too broad and inchoate, but a start—for what we can do to preserve liberalism in the face of such peril.