Last year was the most bitter year for liberal democracy since the depths of World War II. In just about every major election, populists carried the day by railing against the liberal order. Britain voted to Brexit, the Philippines to elect Rodrigo Duterte, and the United States to enthrone Donald Trump. (And then there was Italy, Slovakia, the regional elections in Germany, and much more besides.) By the end of the year, the string of upsets had become so constant that it was widely seen as a major victory when Norbert Hofer—whose ironically named Freedom Party has deep links to the neo-Nazi movement—“merely” got 46 percent of the vote in Austria’s presidential elections.

It’s tempting to take a pessimistic message from liberal democracy’s year of horrors: Populists will keep exceeding expectations. Just as Brexit and Trump were thought impossible in 2016, so too the major elections coming our way in 2017 will end in nasty surprises. Angela Merkel, the last adult in the room, will fall from grace. Geert Wilders, who has called for a ban of the Quran, will win elections in the Netherlands. And Marine Le Pen, whose presidency would ally France with Russia and pose an existential threat to the European Union, will conquer the Élysée Palace.

All of these outcomes are plausible. Too many pundits and political scientists still assume that we live in ordinary times, in which political shifts are slow, voters consistently reject radical parties and candidates, and opinion polls are a reliable guide to election results. But the last year shows that we now live in extraordinary political times. It’s perfectly possible that 2017 will be as bitter as 2016.

But while a dose of pessimism is important, confident predictions of doom are as simplistic as mindless optimism. The real lesson to draw from the nasty surprises of 2016 is not that populism will always win or decency always lose; it’s that the range of realistic outcomes has widened radically.

In the new era of political fluidity, extreme negative outcomes like a victory for far-right populists have become more likely. But other surprises have become more likely, too. And so 2017 might just as well bring the shock victory of a principled centrist such as Emmanuel Macron in France, of a far-left coalition in Germany, or simply the comfortable re-election of the existing government in the Netherlands.

The same goes for the United States. I’ve written that too many people are still underestimating the danger posed by Trump’s presidency and indeed that he could pose an existential threat to American democracy. So it would be easy to jump to the conclusion I am a dyed-in-the-wool pessimist confidently predicting that Trump will do grievous and lasting damage to the body politic. But that’s not what I think. Instead of assuming the worst case—or indeed any case—I believe that there is a wide spectrum of outcomes. Some are hugely pessimistic, others highly optimistic, with most falling somewhere along that vast range.

So, yes, there is a chance that Trump marks the beginning of the end of American democracy. And, yes, there is a good chance that Trump will corrupt the American republic in lasting ways. But there is also a chance that this scary story will ultimately have a happy ending.

What might such a happy ending look like? I’ve mostly given up hope that Trump will drastically change his ways once he’s in office. I don’t think that impeachment would be an especially good outcome, since it would make America’s deep political divide even nastier. Nor do I think that a narrow win for the Democratic candidate in 2020, won mostly by reassembling the Obama coalition with a bit more luck than Hillary Clinton had in 2016, would help to move us past the danger posed by the ethnocentric right: So long as the primary dividing line in American politics remains ethnic rather than economic, the country’s deep rift will continue to fester, and racist dog whistles will remain a core element of our politics.

So here is the most plausible optimistic scenario, which remains pretty unlikely and still involves plenty of bad: Trump will continue to bluster and to rant, to change his mind about major questions of domestic and international politics from day to day, and even to cozy up to foreign dictators. In the beginning, his willingness to take the bluntness of the campaign trail into the Oval Office might prove fairly popular. Tax cuts may stimulate a short-term boom, and a series of deals with foreign powers like Russia will make him look like a strong leader on the international scene.

But soon the true costs of these short-sighted policies will begin to manifest. Trump will find that changing his mind about public policy on the campaign trail is surprisingly costless—but indulging in the same behavior when in office makes it very difficult to build the majorities he needs to get things done. He will find that the tax cuts that stimulate a short-term boom harm the economy in the long run. He will find that cutting a deal with Vladimir Putin might make you look strong when you’re shaking hands but makes you look weak once he starts to harm U.S. interests with impunity. He will find that incompetence and cronyism are tolerated in the abstract—but come to define your presidency if voters blame you for a lackluster response to a flood or a hurricane.

When things start to go wrong for him, Trump will double down on his anti-immigrant stance: He will resume calling Mexicans rapists. His chaotic program to deport undocumented immigrants will sweep up American citizens again and again.

Somewhere along the way, something breaks. Even Trump’s supporters stop seeing his anti-immigrant statements as refreshing authenticity, his cronyism as clever self-assertion, or his flirtation with dictators as hard-headed realism. Instead, most Americans will start to see that he is diminishing his country’s place in the world. They will recognize that self-dealing and incompetence is not endearing when it means that you cannot count on the government in a moment of desperate need. And they will prove unwilling to brook chaotic cruelty against Latinos, Muslims, and blacks.

Faced with Trump’s deep unpopularity, GOP leaders may then gain the sudden courage of their convictions. Claiming that they had always found his lack of patriotism or his conflicts of interest or his racist appeals disqualifying, they will invoke noble principles they had cravenly shoved to the side just a few months before. After years of stoking the beast of racism one moment, only to try to contain it the next, they may even pledge to eschew dog whistles.

In 2020, with Trump spectacularly unpopular, the establishment of the Democratic Party is tempted to field a safe candidate who can run up the numbers among key demographic groups. But the base realizes that it’s not easy to get elected just by saying that the president is horrid. So instead, it coalesces around a young, charismatic candidate who lays out an ambitious vision for how the government can improve the lives of all Americans. Taking a leaf out of Obama’s campaign and disavowing the failed strategy pursued by Clinton, this candidate does not pitch his or her appeal to a narrow coalition but to the nation as a whole. With many moderate Republicans disavowing Trump, the Democratic candidate wins in a landslide.

It would be tempting to end the optimistic scenario here. But to be truly confident about the future of American politics, we need to add one more flight of fancy: In 2024, or perhaps in 2028, Republicans return to power. But their party has changed. It has banished the alt-right. It has stopped campaigning along racial lines. And though it has a very different economic vision for the country—one I’m likely to disagree with passionately—it, too, finally takes pains to emphasize that there is more to unite than to divide Americans.

Is any of this realistic? Would Trump’s supporters really turn on him so decisively? Can Democrats really find a charismatic candidate with a forward-looking vision? And will Republicans ever give up on the dog-whistle politics that has defined their electoral strategy for decades?

I don’t know. But while we need to imagine the most pessimistic scenarios to know what to oppose, it’s just as important to envisage the most optimistic scenario to know what to fight for. In fact, thinking through the best-case has already taught me an important lesson: It’s not enough to defeat Trump. To neutralize the broader threat to liberal democracy, we need to forge the widest possible coalition against his brand of politics—and start thinking about how to build a healthier politics atop the ashes of his presidency.