In Obama's farewell address Tuesday night, he proclaimed his tenure a success. But his domestic achievements will be reversed, and his legacy will be war.

President Obama was not supposed to go out like this. Since the improbable election of Donald Trump, he has been trying to salvage his legacy. After all, what could be a greater repudiation of a progressive Democrat’s presidency than Americans choosing Trump as your successor?

Obama didn’t expect this. He even admitted at one point during the campaign that if Hillary Clinton didn’t win, he would “consider it a personal insult—an insult to my legacy.” So lately he’s been scrambling, not just to ram through last-minute regulations and executive orders but to convince the country that his presidency has been a success. In his farewell address on Tuesday night, Obama once again laid out his now-familiar litany of achievements: a rescued economy, Obamacare, the international climate change pact, the Iran nuclear deal, rising wages, and so on.

In Obama’s mind, his tenure has been nothing short of unbelievable. “If I had told you eight years ago that America would reverse a great recession, reboot our auto industry, and unleash the longest stretch of job creation in our history, if I had told you that we would open up a new chapter with the Cuban people, shut down Iran’s nuclear weapons program without firing a shot, and take out the mastermind of 9/11, if I had told you that we would win marriage equality, and secure the right to health insurance for another 20 million of our fellow citizens—you might have said our sights were set a little too high.” But, he added, “That’s what we did.” In Obama’s world, “America is a better, stronger place than it was when we started.”

That’s not how most Americans feel, though. Voters rejected continuity with Obama’s policies in favor of uncertain change, placing power in the hands not just of a political novice, but a man of questionable judgment and temper. That’s how much Americans disagree that Obama’s time in the White House has been a success. It is a sobering indictment, even if Obama appeared to be unaware of it Tuesday night.

Obama’s Style of Governance Grew From Hubris

This indictment is made worse by how high the expectations were for Obama’s presidency when he took office in 2009. His supporters were optimistic, even ebullient, despite the worst economic recession since the 1930s and Obama’s inexperience. Obama was likewise optimistic. In his inaugural address, he spoke in lofty tones of choosing “hope over fear, unity of purpose over conflict and discord.” He proclaimed “an end to the petty grievances and false promises, the recriminations and worn-out dogmas that for far too long have strangled our politics.”

Obama would be a “post-partisan” president, his administration would herald a new era of transparency and honest dealing in government, and together we would transcend our differences. It was a new era, he said, and “the stale political arguments that have consumed us for so long no longer apply.”

So much for all that. Obama’s presidency proved instead to be a time of intense rancor and discord, worsening racial enmity, eroding trust in government, and a national public life marked by petty grievances, false promises, and endless recriminations. He leaves behind a polarized America, a Middle East in flames, an unstable international order, and a Republican-controlled Congress and incoming president who have staked their reputations on dismantling every signature achievement of his presidency.

The “pen-and-phone” strategy he announced in 2014, rejecting bipartisan compromise with Congress, was predicated on a Democratic successor who would preserve his executive decrees and regulations. Instead of building support for major initiatives, Obama governed under the assumption that Democrats had achieved a permanent majority.

Indeed, his entire approach to governance belied a conceit that the major questions of policy had been settled. From health care to climate change to financial regulation, the question was not whether the federal government should take action, but what the details should look like. As Obama said Tuesday night, “We can argue about how best to achieve these goals, but we can’t be complacent about the goals themselves.”

Obama was uninterested in debate, still less in persuasion. If you didn’t agree, you were on the wrong side of history. In this, Obama helped shape the dominant ethos of the Democratic Party, which was also the basis of Clinton’s campaign: we are on the winning side. The “deplorables” who support Trump, who aren’t on board with the progressive agenda, are “irredeemable.” Why bother reaching out to them? Why compromise, when victory is certain?

Thus the shock of Trump’s victory. In his speech Tuesday night, Obama could not even conjure the grace to wish Trump success—something even Jimmy Carter managed to do. Carter pledged to support Ronald Reagan “to the very limits of conscience and conviction,” and wished him “success and Godspeed.” Obama could not do this, because success for Trump will mean dismantling everything Obama tried to build.

Obama’s Lasting Legacy Will Be War

If Obama’s domestic legacy is evanescent, his enduring legacy will be in foreign policy. In 2008, Obama promised to “restore our moral standing” in the world, by which he meant that America would retreat from the international stage to “focus on nation-building here at home.”

In practice, that meant abandoning the Middle East and allowing ISIS to rise from the ashes of Iraq. Obama was elected on nothing so much as a desire among Americans to be done with that part of the world, and Obama had an idea how to do it: elevate Iran as a regional hegemon to replace America.

That’s why he pursued the Iran nuclear deal. The price he was willing to pay is that the regime in Tehran could have nuclear weapons within the next decade, if not sooner. The mullahs know this, and it has emboldened them. (Just this week, Iranian naval vessels made a simulated attack run at a U.S. destroyer, which opened fire in response.)

The story is much the same all over the world: American retreat is emboldening our adversaries. Russian aggression has grown to the point that Moscow launched an “active measures” campaign to disrupt our presidential election, even as it pursues revanchist aims in Eastern Europe and an irregular military conflict in Ukraine that has left more than 10,000 dead. Nearly a half-million have perished in Syria’s civil war, thanks in large part to Obama’s refusal to intervene. Iraq, left to its own devices when Obama pulled out American troops in 2011, has proven unable to defeat ISIS. An irredentist China is installing military bases on man-made islands in the South China Sea, forcing a strategic realignment along the Asia Pacific.

All of which to say, on the eve of Obama’s departure from office the world is more unstable, and a major conflict more likely, than at any time since the Cold War. This was not inevitable; it was the result of conscious choices by Obama and his inner circle. In assessing his likely place in American history, it calls to mind James Buchanan, perhaps our worst president ever. In one of his last public addresses before leaving office, Buchanan laid out the reasons for his inaction following the secession of South Carolina. On January 8, 1861, he gave a speech about the “threats to the peace and existence of the Union”—a bit of a euphemism, since South Carolina had seceded weeks earlier, and the Union had in fact already ceased to exist.

Buchanan’s approach to national security in this moment of ultimate crisis was much the same as Obama’s approach to foreign policy: he determined to do nothing, hoping for a “peaceful solution of the questions at issue between the North and South.” Buchanan refused even to send reinforcements to Fort Sumter, “lest it might unjustly be regarded as a menace of military coercion, and thus furnish, if not a provocation, at least a pretext for an outbreak on the part of South Carolina. No necessity for these reinforcements seemed to exist.”

The next day, Mississippi seceded. The day after that, Florida. Before the month was out, Alabama, Georgia, and Louisiana would secede, followed by Texas on February 1. Confederate forces attacked Fort Sumter on April 12, and war was joined between North and South.

If Obama has a legacy that will endure, it will be a major war. Not a civil war of the kind Buchanan helped provoke, but a global conflict made possible by America’s retreat from the world—a retreat that Obama pursued for the sake of a domestic agenda that belongs to the wind.