Demonstrators protest against President Trump’s executive immigration ban at Chicago’s O’Hare International Airport. Photo: Joshua Lott/AFP/Getty Images

John Quincy Adams was defeated for reelection in 1828 by Andrew Jackson, who proceeded to win reelection in 1832, and whose fellow Democrat, Martin Van Buren, won in 1836. It seemed to cement for all time the defeat of Adams’s vision of an active federal government that would invest in education and infrastructure, and the triumph of the Southern vision of slavery and weak central authority. “I fell, and with me fell, I fear never to rise again the system of internal improvement by national means and national energies,” he wrote in 1837, according to Louisa Thomas, and mourned that the defeats would “rivet into perpetuity the clanking chain of the slave.”

Long-term pessimism about the liberal project has come roaring back in style since the election. Barack Obama’s pet line, “the moral arc of the universe is long, but it bends toward justice,” has been hauled out for a great deal of public mockery on all sides. The liberal coastal elite has wallowed in self-flagellation about their failure to understand the great country, a sentiment Donald Trump’s henchmen have exploited to cast the news media as an alien appendage from the real America and its deep, mystical bond with the new president. (“They don’t understand this country,” claims Steve Bannon, “They still do not understand why Donald Trump is the president of the United States.”)

But the events of the last two weeks, both of which have seen massive nationwide protests against the new presidency, suggest a different conclusion. It is Trump who does not understand this country. And it is Obama’s vision of the country that will ultimately win out.

The election has provided ample reasons for alarm. But it is important to have some clarity about what we ought to fear. The federal government is in the hands of an extremist claque. It will probably carry out enormous amounts of terrible policy, and the tail risks of permanent disasters arising from misgovernance — new Katrinas, new Iraq Wars, or worse — are terrifyingly high.

On the other hand, there is no reason to believe Trump is actually good at politics. He has the largest popular-vote deficit of any president ever elected and comes into office with historically low approval ratings. The only things he has done well are to gauge correctly the fecklessness of his Republican rivals, who he understood would fall in line behind him even after he smeared and bullied them mercilessly, and to beat up on Hillary Clinton while James Comey, Vladimir Putin, and the national media pinned her arms behind her.

Some liberal journalists have greeted each new Trump action by solemnly insisting that we “take him literally” and that he will do what he says. But what exactly should we take literally? His promise to provide terrific health insurance that covers everybody, at lower cost? Forcing Mexico to pay for the wall? Resuscitating the declining coal industry? The complete eradication of Islamic terrorism? The most competent president would not achieve these goals. And Trump is a political amateur who has surrounded himself with other political amateurs. He will wreak a fearful toll on this country before he is finished, but the assumption that Trump will “do” what he promises extends him credit he does not deserve.

The argument of my new book is that Trump (who was an important character in it even before the election) represents the death rattle of a declining vision of American retrenchment, and Obama represents the future. The civic values our grandchildren will celebrate and be taught in schools will be Obama’s, not Trump’s. American history is punctuated with horrors. Yet the reality is that life in the United States is better — more affluent and more egalitarian — than it was 50 years ago, and 50 years ago it was better than 50 years before that, at which point it was better than a half-century before.

Obama’s story about the arc of history does not imply that progress moves forward steadily and without interruption, or that liberals should adapt to complacency, or that progress will occur without conflict. Indeed, that conflict has burned for more than two centuries. What we now call the struggle between red and blue America was the same basic divide that pit Adams against Andrew Jackson. Blue America envisions a positive role for government in developing the talents of all its citizens, regardless of identity. Red America intertwines a suspicion of elites and centralized authority with a commitment to racial revanchism.

Adams’s fatalistic assessment 180 years ago seemed accurate at the time, after his party had suffered three consecutive defeats. And, indeed, his Whigs would suffer a series of misfortunes leading to its ultimate expiration within two decades. Yet, in the long run, Adams’s ideas won out. Slavery was abolished in 1865, a national bank was established in 1913, and the federal government actively invested in education and infrastructure, all as Adams had dreamed. “From the vantage point of the twenty-first century,” writes historian Daniel Walker Howe, “we can see that the Whigs, though not the dominant party of their own time, were the party of America’s future.”

Why have the successes of blue America proven more durable than those of red America? One reason is that liberal politics has a better record of producing successful policies. For all the rage conservatives have generated against Obamacare, it is fulfilling its goals and providing access to medical care to people who are too poor or sick to afford it. When Republicans gathered Friday to strategize on health care, a secret recording revealed that they haven’t the faintest idea how to proceed. Trump’s immigration crackdown was drafted and executed in an absurd fashion. It looks “like what an intern came up with over a lunch hour,” one lawyer told Ben Wittes. “My take is that it is so poorly written that it’s hard to tell the impact.”

Demographic change is another source of liberal confidence that has sustained a lot of post-election mockery. Yet the fact remains that Republicans remain heavily dependent on running up large margins among the oldest voters. The youngest cohort has remained about as staunchly Democrat today as it was in 2008. Americans under the age of 30 are far more racially diverse than their parents and grandparents, and young whites are far less likely to vote Republican. The Trump coalition can win an election, but its margin for error is shrinking.

The blue coalition has weaknesses of its own. Liberal voters have a congenital tendency to sulk when Democrats hold the presidency. And the younger voters Democrats have come to rely on turn out less reliably than the Republican base. But the Women’s March last weekend, and the immigration protests this weekend, have drawn on powerful American ideals: inclusion, social mobility, and optimism. Obamaism may have lost control of the levers of government, but it has never lost the country.