As of now, the most famous Muslim socialist ever secretly born in Kenya has around 48 hours left to make good on his plan to turn God’s favorite country into kitty litter. Barack Obama had eight years to take away everybody’s guns and impose Sharia law. Yet here we are, packing heat and backing Jesus more than ever. Can you spell incompetence?

In dreary fact, at least on the home front, competence—not transformative poetry and not inspirational oration—has been one of Obama’s virtues. If domestic policy boils down to successful stewardship of the world’s largest economy, the stats leave our president looking pretty good. Unemployment is way down, the stock market cruised into the stratosphere once Wall Street recouped from the 2008 crash and median income increased in his final year in office after declining since 2007. Naturally, many Trump supporters refuse to believe any of this—or that crime and illegal immigration rates went down on Obama’s watch, too.

But ever since World War II turned the U.S. into a superpower, foreign policy has been the main ball game for presidents who aspire to greatness (which even the most ineffectual clucks in the bunch do). Even at times when the American public doesn’t particularly care, they know history will. It’s a bitter pill for Democrats that the only POTUS since FDR to come away a winner on the international stage is Ronald Reagan, who had one goal: to turn the Soviet Union into kitty litter. He did just that, by golly.

As far as most of the world was concerned, Obama started off with one advantage that made them all cry hosanna. Namely, he wasn’t George W. Bush. That was enough of an “achievement” to win him a Nobel Peace Prize before he’d done squat. In those embarrassingly euphoric days, few people recognized that the “Global War on Terror” Obama had inherited wasn’t going to vanish overnight, although Obama himself did. He may have been the first Peace Prize recipient to spend most of his Nobel address expounding on the uses and necessity of America’s armed might—not exactly what those hopeful Scandinavians wanted to hear.

Nonetheless, Obama started out with zero foreign-policy experience, no huge hawkishness about permanent war as a solution to intractable quagmires and one all-purpose mantra: “Don’t do stupid shit,” often euphemized as “Don’t do stupid stuff.” Like all presidents before him, he discovered that he didn’t have to instigate stupid shit for it to keep erupting anyway. He wanted to replace Dubya’s foolhardiness with caution, which too often ended up looking like uncertainty. Above all, he wanted to do that Syria, an ongoing disaster that’s reaching its endgame only because Bashar Al-Assad is running out of Syrians to kill and displace with Vladimir Putin’s help. Thanks to the rise of ISIL, even killing Osama bin Laden now seems like an inconclusive blip in an apparently endless series of Middle Eastern conflicts.

Depending on your vantage point, Obama’s conduct of international affairs looks either smarter or more feckless once you stop concentrating on his administration’s responses to immediate crises and go macro about its big-picture assumptions. Even though he’d be pilloried for saying so, his foreign policy’s unmistakable premise is that the U.S. won’t be the world’s only superpower forever. That is no doubt an unwelcome truth to most Americans, but it’s a looming reality nonetheless. So he’s done his best to recalibrate our world position while we’ve still got enough clout to make it stick.

His foreign policy’s unmistakable premise is that the U.S. won’t be the world’s only superpower forever.

That includes the Iran nuclear deal, which isn’t really only about keeping Teheran out of the WMD club. Thanks largely to Bush’s botched Iraq intervention, Iran is now the region’s dominant power aside from Israel. That means we’re better off substituting leverage and negotiation for knee-jerk hostility. It also means putting some daylight between our interests and Israel’s, even if that’s more symbolic than real. (Abstaining from a U.N. resolution condemning West Bank settlements is a long way from putting material pressure on Prime Minister Netanyahu to quit building the damned things.)

Despite his soaring rhetoric early on, little, if any, of Obama’s foreign policy has been fuzzily idealistic. Instead, he’s turned out to be better at hardheaded practicality. His administration’s fabled “reset” of our relations with Russia was a misfire, but the retaliatory sanctions, imposed for Putin’s annexation of Crimea, have hit him where it hurts. Why do you think he’s so partial to a new president who’s eager to lift them?

Of the two major international accords negotiated during Obama’s tenure, the Trans-Pacific Partnership is now a dead letter. If that sounds like good news for American workers, don’t forget it’s also good news to Beijing, since one of TPP’s unacknowledged purposes was to box in China’s economic muscle. Meanwhile, the most geopolitically valuable bonus of the Paris Agreement was how it subtly recast the United States as one collaborative nation among many, not the 600-pound gorilla in the room.

The long-term benefits of Obama’s revisionist approach to America’s role in the world were never readily apparent, but a reduced willingness to unapologetically throw around our weight was. For that, all of his labors could be undone in the first few months of Trump’s presidency. It’s not hard to imagine Donald Trump being weak where he ought to be strong—that is, vis-à-vis Russia—and belligerent where he ought to be circumspect.

At least for a while, though, Trump may be able to bluster his way into convincing most Americans the opposite is true, a tactic Obama disdains. Of all the guesses we might have made eight years ago about our 44th president, one nobody ever considered was that he might end up being shrewder about making policy than he was about selling it.