Part of a magazine series examining The Obama Legacy. Read more about this series below.

In foreign affairs, unlike math, the ultimate determination of success or failure isn't immediately obvious. Major foreign events — wars, revolutions, coup d'etats and treaties — can take a long time to play out.

The Korean Conflict, once nearly as unpopular as the Vietnam War, is now probably viewed by most Americans as a "good war," and Washington's 63-year defense of Seoul as a worthwhile investment. Thirty-seven thousand U.S. servicemen, a number that dwarfs those killed in Iraq and Afghanistan, didn't die in vain.

Historical judgments are temperamental and subject to change until sufficient good news or bad piles up — and even then things can change given the mood and character of the nation looking back.

Few Democrats really want to expend much effort touting the foreign-policy successes of Jimmy Carter; more Democrats, but still not many, want to remember how ardently they believed Ronald Reagan would bring on Armageddon. The Soviet empire's collapse in 1989-90 and Mikhail Gorbachev's judgment on Reagan (a "great president") puts anti-Reagan leftists in a difficult position. Facts can matter.

Which brings us to President Obama, who in his own way is probably the most consequential commander in chief since Reagan. For some, he's the worst foreign-policy president since World War II; for others he's perhaps one of the best.

Despite his aggressive use of drones and special-forces operations, his embrace of rendition, his failure to close Guantanamo and the lingering war in Afghanistan, he has done much "to bring America home" and weaken the case for future foreign interventions.

Arguing about Obama's legacy is difficult because the United States may be at a pivot point where a consensus within the foreign-policy establishment, let alone in the country at large, is no longer possible on fundamental issues.

President Obama, shown above posing for a family photo at the G-20 summit with other world leaders, in his own way is probably the most consequential commander in chief since Ronald Reagan. (AP Photo)

America's isolationist sentiments, which ruled the country from its founding until WWI and again until the rise of fascism, may be ascendant, even in Washington, where liberal internationalism has held sway since the Japanese surrendered in 1945.

Of course, America may just be oscillating, as it did after the Vietnam War. Obama's recoil from American hegemony, part of the gospel of the Sanders Left and echoed by many Tea Party Republicans and Donald Trump, may not prove lasting.

A great challenge, more menacing than 9/11, might push the pendulum towards a willingness to endorse the regular use of force, including war, as an indispensible part of protecting our national interests and even our "free-loading" allies. As with Reagan, a future president and Congress could decide that we will not balance the budget and reduce the debt by diminishing the country's capacity to fight.

It's worth doing a tour d'horizon of Obama's foreign accomplishments to get a grasp of how he has changed American expectations. We should start with the Iranian nuclear deal, the achievement the president is most proud of.

As Obama has often said, it will likely make or break his foreign-policy legacy.

Iran

The details of this deal reveal a strategic re-calculation that extends far beyond the Islamic Republic. It's worthwhile to review them — not to re-litigate the agreement, which Hillary Clinton has already embraced and a President Donald Trump would probably be too fearful to abandon — but to show the magnitude of what Obama has wrought.

The Joint Comprehensive Plan of Action is a short-term, technical accord, which if the clerical regime lives up to the bargain, will stall the mullahs' nuclear ambitions for about a decade. At that point, they may start manufacturing advanced centrifuges, the research and development of which aren't prohibited by the agreement.

With advanced centrifuges, cascades can become small and undetectable by satellites. Any warehouse could become a cascade site. Once large-scale production starts, the undetected diversion of enriched uranium from monitored plants also becomes vastly easier.

The nuclear accord is a gamble that the Islamic Republic will change — "moderate" — within a decade if it's freed from sanctions and reconnected to global commerce. Imagine the 1990s in Iran, when European and Japanese businessmen invested billions, except without the mullahs' anti-American and anti-Israeli terrorism and aggressive use of assassinations at home and abroad.

Imagine greater European, Asian and American commerce somehow discouraging, not subventioning, the clerical regime's imperialism in Syria and Iraq.

Even though deputy national security advisor Ben Rhodes may have exuberantly highlighted the hopes for the mullahs' moderation in his public-relations campaign for the JCPOA, it's likely the president and Secretary of State John Kerry actually believed Iranian president Hassan Rouhani, a creature of the Iranian national-security state and a founding father of the Islamic Republic's intelligence ministry, and his hand-shaking, American-educated foreign minister, Mohammad-Javad Zarif, were the cutting edge of possible, meaningful reform.

As an arms-control agreement, the JCPOA, as Ray Takeyh of the Council on Foreign Relations has remarked, is the most deficient arms-control accord in history since it contains its own planned obsolescence. It is also in terms of verification just downright bizarre.

Exhibit A: The Potemkin-village "self-inspection" of the Revolutionary Guard base at Parchin, where International Atomic Energy Agency inspectors and American intelligence are convinced that the Iranian regime once conducted tests for a nuclear trigger.

President Obama didn't demand, as is IAEA practice, that the nuclear sinner come clean about past transgressions of the Non-Proliferation Treaty, to which Iran is a signatory, offering unrestricted access to its nuclear sites, its personnel and the paperwork.

Senior administration officials in private are quite open about why the president didn't insist that Tehran do what the IAEA demanded of Pretoria, which allowed complete access to its nuclear infrastructure and experts in the early 1990s. The reason is that mullahs would have refused.

A reasonable observer might conclude that the Obama administration didn't really care about past machinations, since the deal's shelf-life matches closely the likely time required for the Iranians to perfect the production of the IR-8 advanced centrifuge. (Ali Akbar Salehi, the MIT-educated nuclear engineer who heads Iran's Atomic Energy Organization, gave a long and revealing interview about how the nuclear accord dovetails with the required time to develop the IR-8.)

Further cementing the Islamic Republic's status as the Middle East's new hegemon, President Obama also unilaterally decided that the mullahs' long-range ballistic-missile program would not be included in the agreement, even though the development of intercontinental missiles makes no sense unless capped with atomic warheads.

President Obama unilaterally decided that the mullahs' long-range ballistic-missile program would not be included in the arms-control agreement, even though the development of intercontinental missiles makes no sense unless capped with atomic warheads. (AP Photo)

Wendy Sherman, a lead negotiator with the Iranians, defended the ballistic-missile exclusion by highlighting the determination and capability of American intelligence to detect Iran's construction of a warhead. How exactly Washington would detect such activity, especially when warhead design and manufacture is the most compact part of making a bomb and thus the easiest to conceal, Sherman never explained.

John Brennan, the director of the Central Intelligence Agency, also promised that American intelligence would be up to the task. Brennan didn't note that the CIA missed the development or misjudged the delivery date of nuclear weapons in North Korea, India, Pakistan, South Africa, China and the Soviet Union.

It's a decent guess that Langley didn't have a good grasp of the atomic specifics with Israel and could well have missed France's nuclear-bomb program if Paris hadn't told Washington what it was doing. That leaves Great Britain.

It is hard to envision the Democratic Party of the 1990s agreeing to such a weak nuclear accord with a country that is still on the State Department's list of state sponsors of terrorism. It is an absolute certainty that monies already released by the agreement have found their way into the Islamic Republic's adventurism in both Syria and Iraq and into the treasury and arsenal of the Lebanese Hizbollah, which is also on the U.S. terrorist list.

President Bill Clinton and his secretary of state Madeleine Albright may have made little fools of themselves, after the reformist cleric Mohammad Khatami was elected president in 1997, apologizing for all the Great Power unpleasantness that the West had inflicted on Iran.

They wanted to blink at the ugly reality: A year earlier, Tehran had killed 19 American servicemen and wounded hundreds at Khobar Towers in Saudi Arabia, an operation that was in all probability authorized by Iranian president Ali Akbar Hashemi-Rafsanjani (Rouhani was then Rafsanjani's aide-de-camp and operational hatchet-man).

But the Democratic Party wasn't on happy gas. Clinton and Albright were putting out little feelers; they had also advanced, at times enthusiastically, a "dual containment" strategy for Saddam Hussein's Iraq and the Islamic Republic.

What is so striking about Obama's approach today is that the Islamic Republic is regionally much more aggressive than it was in the 1990s; it's more brutal at home. The Revolutionary Guard Corps, the praetorians of the supreme leader, are significantly more powerful than in the 1990s. They have developed into a brutal expeditionary force (see Syria) and a domestic security service that rivals the ministry of intelligence in its fearsomeness.

And the reformists have been vanquished. Most perversely for Iranian dissidents, Obama has embraced as "moderates" the pragmatic revolutionaries in the Rafsanjani-Rouhani circle, who laid low Iran's reform movement in the 1990s and largely remained silent or cheered when Khamenei crushed the pro-democracy Green Movement in 2009–10.

In Washington today, internal Iranian politics and the clerical regime's imperialism really don't matter. The technical details of the nuclear deal, which administration officials loved to dilate on, didn't really matter either, at least among Democrats.

What mattered was avoiding the risk of war. President Obama has now tied the United States to a defective atomic agreement, which will inevitably create further regional instability as the mullahs' ballistic missiles improve and the open manufacture of IR-8 centrifuges draws closer.

President Obama has now tied the United States to a defective atomic agreement, which will inevitably create further regional instability as the mullahs' ballistic missiles improve and the open manufacture of IR-8 centrifuges draws closer. (AP Photo)

Sanctions are the quid pro quo of the agreement: Washington can no longer attempt to punish the clerical regime's non-nuclear aggression without risking the JCPOA. The Iranian regime has been the primary enabler of the horror show in Syria, where hundreds of thousands have perished and millions more have been made homeless or fled abroad.

Obama has (mildly) rebuked Vladimir Putin for his military support to Syria's Bashar al-Assad, but he has remained nearly mute about Tehran's support to Assad's killing machine. The administration's silence about the often fiery pro-Assad speeches by Khamenei, Rouhani and Zarif is noteworthy.

Morally, the nuclear agreement has already become corrupting. An American president has effectively made the United States and Europe financial handmaidens to Iranian expansionism and domestic oppression. It's important to remember that the Europeans were not asking for a softer approach to Tehran.

The French and the British led the European Union to implement an oil boycott of the Islamic Republic in the summer of 2012, when Obama secretly dispatched William Burns and Jake Sullivan to Oman for talks with Iranians.

Although the European Union's diplomatic initiative toward the Islamic Republic in 2003 started because the Europeans feared American or Israeli military action against the recently revealed Iranian nuclear sites, the French, British and Germans (the EU3) by 2009 had become fully vested in trying to stop the mullahs' atomic ambitions. President Obama, not the Europeans, led the concessions to Tehran during the nuclear talks.

Iraq and Syria

And Obama's achievement in Iraq may be almost as consequential as the JCPOA. The two are connected. If the president hadn't withdrawn American soldiers from Iraq in 2011, which set in motion the rise of the Islamic State, the nuclear deal with the mullahs would have been politically impossible.

American forces, which had restored order and public life throughout most of the country by 2008, would have remained targets for Iranian-trained-and-targeted militias and assassination squads. The American withdrawal was openly opposed by Iraq's Sunni leaders, who knew that U.S. soldiers were indispensable to checking Iranian-backed Shi'ite sectarianism.

And indeed, the withdrawal quickly destroyed the communal modus vivendi. It indulged Iraqi prime minister Nouri al-Maliki's worst instincts. Thousands of Iraqi Sunnis turned toward the Islamic State, whose upper echelons are overwhelmingly Iraqi. Shi'ite Iraqis who opposed Iranian power in their homeland — probably a large majority — lost their crucial counterweight. The "Hizbollization" of the country's Shi'ites went into overdrive.

The American withdrawal clearly signaled that the president was more ideologue than pragmatist. Middle Eastern Sunni states knew henceforth that Washington was no longer interested in checking the Islamic Republic. Anti-Iranian Saudi militancy grew white hot. The clash between Saudi and Iranian Islamism, which fueled the growth of Islamic militancy in the 1980s, is today supercharging sectarian hatred, which has always been pure oxygen for anti-Western jihadists.

Syria and Iraq are the primary battlegrounds, but its impact goes far beyond. President Obama's remark that Iran and Saudi Arabia needed to learn to "share the neighborhood" as America reduces its presence in the Middle East is a confession that the president knows little about Islamic militancy and his own role in the broadening Sunni–Shi'ite collision.

It's likely that he doesn't really care all that much. The man who came to Cairo in 2009 to announce a new beginning for U.S.–Muslim relations discovered that the Middle East was complicated, time-consuming, violent and too distant from his domestic progressive passions.

The quiet and ignominious return of nearly 6,000 American soldiers to Iraq to aid a haphazard alliance of forces against the Islamic State made a mockery of the administrations' public reason for leaving in 2011 — that Obama couldn't conclude a new U.S.-Iraq Status of Forces Agreement sufficiently protective of U.S. soldiers. America's return has placed us in the odd position of fortifying the hold Iranian-backed militias have over the country.

What Obama did by default in Syria (by abandoning his demand for Assad's removal and his own redline against the use of chemical weapons), he has done by choice in Iraq: he has effectively chosen Shi'ites over Sunnis.

Fear of the Islamic State and al Qaeda and its affiliates, fear of deploying ground troops into harm's way — that is, in a manner where American power could have some political effect — has led Obama to align the United States with forces that have been primary drivers of sectarian conflict and religious radicalization. Fear of jeopardizing the nuclear deal has surely reinforced the president's strong belief that doing nothing in the Middle East is better than doing something.

In Syria, Obama has watched hundreds of thousands slaughtered, millions made homeless and Turkey, Europe and much of the Middle East shaken by tidal waves of refugees. Islamic terrorism and radicalism have grown to a strength unimaginable when Obama came to the White House in 2009. This is not all his fault, but his choices have had grave consequences that will likely echo for generations.

And what President Obama has done is now extremely difficult to undo. Hillary Clinton will not challenge the nuclear agreement with Iran. She and her primary foreign-policy aide, Jake Sullivan, may think that they can keep the agreement and aggressively push back against the Islamic Republic. Clinton has mentioned creating "safe havens" in Syria. Odds are high that when she and Sullivan think it through, they will do next to nothing.

In Syria, Obama has watched hundreds of thousands slaughtered. (AP Photo)

And a President Trump would probably be a President Obama on speed. He would align America openly with Assad and Putin in their fight against the Islamic State, al Qaeda and whatever Sunni radicals rise up in Assad's wasteland. He would effectively align Washington with Tehran.

To ditch the Iran nuclear deal now, as Trump sometimes says he would do (and sometimes not), would oblige Washington to prepare for military strikes against the mullahs' nuclear facilities. Trying to raise sanctions again, with Europe in screaming opposition, is a recipe for a paralyzing contretemps. Not even Trump at his most Jacksonian would likely cross these lines. More likely, given his position on Syria, he would go where Obama went before him: Shi'ite radicals are better than Sunni radicals.

As long as the Iran deal stands, Obama's legacy lasts.

China and Russia

Obama's "pivot to Asia" has been mostly smoke and mirrors. The Middle East didn't let go so easily. Although one can make a strong argument for the United States pivoting to Asia to confront and contain the growth of the Chinese military, that isn't what President Obama has sought to do.

Even the Trans-Pacific Partnership Agreement, which was supposed to be the economic pillar of Obama's strategy, and the foundation of a trade relationship designed in part to productively channel and constrain China's economic ambitions, hasn't yet developed. Obama's diffidence about lobbying for his only major trade deal was striking

The U.S. Navy needs a lot more ships if it's to maintain a combat-ready global presence and beef up its commitment to our allies in the Far East. We may debate what kinds of ships Washington should build, but it ought to be clear that the Navy's motto during the Obama years — "do the same with less" — isn't serious when confronting an emerging Chinese superpower. But it's by no means clear that the next president will fortify our Asian commitments.

Clinton has promised the moon in domestic spending. If she gets a Democratic Congress, or even just a Democratic Senate, she might get a big domestic spending spree. How she would square that with the hundreds of billions required to restore the military punch lost during the Obama years, let alone significantly increase America's naval presence in the Pacific, isn't obvious.

And Trump constantly talks about foreign "freeloaders;" his exuberance for the welfare state rivals Clinton's. Imagining Trump defending the sea lanes in the South China Sea or Taiwan or the Philippines is challenging. In other words, Obama's pivot-lite to Asia could become the bipartisan standard. At best, we will continue to do the same with even less.

With Russia, Obama's studied inaction may be overturned. Turning back Vladimir Putin doesn't cost a fortune. Obama's secretary of defense Ashton Carter and the assistant secretary of state for Europe Victoria Nuland have done a lot with little in an effort to shore up confidence in Eastern Europe that the United States will honor Article V of the NATO charter, that a Russian attack on the former Soviet republics of Estonia, Latvia or Lithuania, all members of NATO since 2004, would bring the United States into conflict with Russia.

A President Clinton might well permanently deploy several thousand American troops to Eastern Europe. Unlike Obama who is, as the New York Times Roger Cohen observed, America's first "post-Western president," Clinton is a committed trans-atlanticist.

With Russia, Obama's studied inaction may be overturned. Turning back Vladimir Putin (pictured above with Chinese President Xi Jinping) doesn't cost a fortune. (AP Photo)

It's also possible to imagine Clinton reversing Obama's decision not to arm Ukraine and seriously supporting the development of Ukrainian democracy. Ukrainian popular sovereignty is, of course, the greatest threat to Putin's dictatorship, since Russian propaganda often doesn't distinguish between the two peoples. If Ukrainians can sustain a democracy and become a functioning part of Europe, so might Russians.

All of that appears unthinkable with Trump, who admires Putin and views America's alliances, even NATO, as transactional, subject to review depending on whether foreign countries have done enough for the United States.

Clinton's views currently dominate within the Democratic Party's foreign-policy establishment. The Clinton-Obama differences, negligible in effect elsewhere, may mean something with Russia and Europe.

Republicans

A more lasting impact of President Obama will likely be on Republicans. After Reagan, Democrats adjusted. From his critique of the social dysfunction of the American black community, to his love of deregulation and free trade, to his bombing campaign in the former Yugoslavia, to the expansion of NATO, there was a lot of Reagan in William Jefferson Clinton.

Obama may have ridden a wave of post-9/11/Iraq War fatigue, but he also directed it. The presidential bully pulpit always has impact. The president alone, especially if echoed by the liberal press, can create a national narrative.

President Obama did his part in defining post-surge Iraq as not worth the effort, that whatever progress that had been made post-Saddam (and Obama didn't deny America had improved Iraqi lives) just wasn't enough to overcome the original sin of the invasion. Perhaps a little too subtly for some on the Islamic-allergic American Right, the president suggested that the Muslim world was just too messed up to help. His Cairo speech in 2009 was really just a politically correct sayonara.

Obama's anti-war critique, his narrative of American overreach, of an unshorn hegemon more likely to do harm than good especially in the Muslim world, sank into the nation. President Obama got under the American Right's skin (no one has done this better) but also into the conservative blood stream.

He locked onto the country's uncertainty about its foreign mission civilisatrice, an anxiety unquestionably fueled by the gross inarticulateness of the Bush administration after the Iraq and Afghan wars became hard. Early on, Fox, as much as CNN, became an arena for Iraq War bashing.

When looking abroad, lots of Republicans today sound like variations of Obama. In battling the Iran nuclear negotations, hardly a conservative took the stage to argue why stopping the clerical regime's nuclear-weapons quest was worth risking war.

Their critique of the president's nuclear diplomacy stopped at sanctions, which Republicans usually assured us offered a peaceful way to thwart the mullahs. Bring up the specter of conflict, which President Obama always gleefully did, and most Republicans went running.

A more lasting impact of President Obama will likely be on Republicans. Above, House Speaker Paul Ryan, R-Wis. (AP Photo)

The young intellectual Republican "reformicons" — Ross Douthat, Reihan Salam and Ramesh Ponnuru — aren't that different from the president. His left-wing realist understanding of "the national interest abroad" is essentially theirs. They are all defined by their caution, their strong preference for domestic over foreign policy, their discomfort with George W. Bush's "freedom agenda," liberal internationalism and anything Islamic. Or as Messrs. Douthat and Salam recently put it in the New York Times:

With the exception of Rand Paul and the partial exception of Ted Cruz, the consensus critique of President Obama from non-Trump Republicans often seemed to be that he should have kept more troops in Iraq and kept more troops in Afghanistan and sent more troops to Libya and intervened in Syria and sent more arms to Ukraine and expanded NATO's presence in the Baltics and been more willing to bomb Iran and ...
Some of these policy prescriptions are reasonable, but taken together they look like a road map for more quagmires ...

A wag might note that the gentlemen didn't tell us which of the above policy prescriptions they supported. It's an excellent guess that they would choose whichever one offered the least chance of conflict (I'd go with more NATO in the Baltics ... maybe). If that isn't Obamaism, what is?

American isolationism and non-interventionism have deep roots. Only since World War II has the American foreign-policy elite been able to hold back the American proclivity to tell the rest of the world to bugger off. It perhaps shouldn't be surprising that Obama, who was raised by Kansans, would tap into the country's old skepticism about foreign adventures.

It's doubtful that he will get his proper due from the new American Right. The new Jacksonians — Trump's crowd — really should give the president a break. Push comes to shove, they only want to bomb our enemies a little longer than he did. Their effect overseas will likely be the same.

More tyranny. A lot more chaos.

Reuel Marc Gerecht is a senior fellow at the Foundation for Defense of Democracies.