Daniel W. Drezner is a professor of international politics at the Fletcher School of Law and Diplomacy at Tufts University and a regular contributor to PostEverything.

From left, U.N. Secretary General Ban Ki-moon, Chinese President Xi Jinping and President Obama, during a joint ratification ceremony of the Paris climate change agreement ahead of the Group of 20 Summit in Hangzhou, China, on Sept. 3, 2016. (Pool photo by How Hwee Young via Reuters)

As Barack Obama packs up his belongings and prepares to not be president anymore, the postmortems and assessments of his administration are coming in at a rapid pace. Some of them even in book form already. But there’s an interesting pattern to them:

The hardworking staff here at Spoiler Alerts has a pretty strong interest in foreign policy and has written at length about Obama’s grand strategy. It seems worth pondering whether David Leonhardt’s statement is accurate.

Gimme a sec. … Okay, it’s not accurate. Obama’s foreign policy record is actually quite significant. For both good and bad reasons.

Let’s start with the good: I don’t think even foreign policy folks remember just how bleak America’s position in the world appeared to be in January 2009. The outgoing president was spectacularly unpopular. In the preceding few months, the worst financial crisis in a century had hit the acute phase. The U.S. economy was shrinking by about 8 percent. Lots of foreign observers, and lots of American observers, too, were writing the obituary for American leadership in the world. The German finance minister was predicting that the United States would lose its status as the financial superpower. Beijing was on the rise, and the looming power transition seemed to augur poorly for American interests in the world.

And yet, as I noted over the summer, things turned out rather differently than a straight-line extrapolation would have predicted:

When Obama was elected, the United States was not terribly well-liked in the world. By the time he was sworn in, a growing share of the world’s population — including Americans — believed that American power and influence were on the wane. Nearly eight years later, the United States is looked upon more favorably in most (although not all) parts of the globe, and perceptions of American economic power have returned to pre-2008 levels. Americans themselves have greater confidence in the relative power of the U.S. economy than at any time in the post-2008 era.

None of these outcomes — particularly perceptions of economic influence — was preordained after the 2008 financial crisis. I have no doubt that a lot of readers believe that Obama has squandered the public goodwill given to him by the rest of the world. But credit where it’s due: If perception itself is a form of power, then Obama has made the United States great again.

That ain’t beanbag.

I would also argue that Obama’s grand strategic principle — that the United States needed to rebalance away from the Middle East to focus more on the Pacific Rim — was basically sound. This led to both the Iranian nuclear deal and the bilateral climate change deal with China that paved the way for the Paris accords. These are not insignificant advances on issue areas that, in 2008, were best described as “intractable” or “unsolvable.” Even a truculent Henry Kissinger thought Obama handled China pretty well. It also, however, led to a de-emphasis on issues such as human rights.

Obama’s greatest strength and his greatest weakness as a foreign policy leader was his Zen master approach to world politics. Obama refused to panic and always took the long view. The New York Times’ Michiko Kakutani drove this point home earlier this week in writing about Obama’s reliance on books during his time in office:

Mr. Obama’s long view of history and the optimism (combined with a stirring reminder of the hard work required by democracy) that he articulated in his farewell speech last week are part of a hard-won faith, grounded in his reading, in his knowledge of history (and its unexpected zigs and zags), and his embrace of artists like Shakespeare who saw the human situation entire: its follies, cruelties and mad blunders, but also its resilience, decencies and acts of grace. The playwright’s tragedies, he says, have been “foundational for me in understanding how certain patterns repeat themselves and play themselves out between human beings.”

Obama always kept his eyes on the prize. He did not, however, always keep his eyes on the politics, and that turned out to be a much bigger problem for American foreign policy than he and his defenders realized.

The best way to think about Obama is that he was the Jon Snow of foreign policy. As Lord Commander, Snow correctly perceived the biggest threat to Westeros (the White Walkers) and the best strategy to cope with that threat (bringing as many wildlings South of the Wall as possible).

And for these decisions, he was murdered by members of the Night’s Watch.

In an interview with Entertainment Weekly after that episode aired, Kit Harrington shrewdly assessed Snow’s leadership abilities and why, despite the character’s leadership qualities, he got killed for his troubles:

There’s a huge amount of fault. He hasn’t paid attention to the people around him. He’s only looked at the big picture this season. His major fault is a bit like Ned [Stark]’s in that when trying to do the right thing he wasn’t observing the people around him. He had blinders on. All he could really see is this impending doom by the White Walkers and doing things for the greater good, and what he was missing was Olly and [Ser Alliser] Thorne and some of the men around him. He wasn’t seeing their discontent and dealing with the smaller issues. And because of that, he’s served justice. Olly puts the last dagger in him. In that moment I think he realizes that he didn’t look after his kin, this young man, and let him down.

This is a fair autopsy of Snow’s strengths and weaknesses as a leader; I’d suggest it applies to Obama as well. He always seemed baffled when great powers took steps — *cough* Russia *cough* — that seemed at odds with how Obama calculated their interests. His expectation was that revisionist behavior would be self-defeating in the long run. He might be right about that, but sometimes the short run can alter the future in more permanent ways than the outgoing president appreciated.

This ties back into the one way in which any assessment of Obama’s foreign policy legacy mirrors any assessment of his domestic policy legacy: the man who is replacing him. Another big theme of Obama’s presidency was the notion that nation-building started at home. For reasons partially but not entirely of his own making, however, the president learned to embrace executive power in his second term. He now bequeaths those powers to an incoming president who is undisciplined and only dimly aware of what he can and cannot do as president.

Obama is a patient man, and would no doubt argue that Trump’s illiberal behavior will eventually be self-defeating. But as my friend and colleague Jonathan Kirshner noted in the L.A. Review of Books, there is one aspect of Trump’s election that is irreversible:

Even if we manage to endure the next four years and then oust him in the next election, from this point forward we will always be the country that elected Donald Trump as President. And as Albert Finney knew all too well in Under the Volcano, “some things, you just can’t apologize for.” This will be felt most acutely on the world stage. Keep in mind that in those areas where Trump departs from traditional Republican positions, such as those regarding trade and international security, congressional power is much weaker. Trump can start a trade war or provoke an international crisis just by tweeting executive orders from the White House. And that damage will prove irreversible. Because from now on, and for a very long time, countries around the world will have to calculate their interests, expectations, and behavior with the understanding that this is America, or, at the very least, that this is what the American political system can plausibly produce. And so the election of Trump will come to mark the end of the international order that was built to avoid repeating the catastrophes of the first half the twentieth century, and which did so successfully — horrors that we like to imagine we have outgrown. It will not serve us well.

Obama was more of a restorationist president than his critics realized. He came in at a low point in American power and influence in the world and helped to make America great again. However, his inattention and disdain for the politics of his job laid the groundwork for an incoming president who can tear down the very order that Obama fought hard to preserve.

I hope Obama proves to be right about the long arc of history. But I fear he has been wrong too many times during his presidency for me to have that much hope for the immediate future of America in the world.