On the eve of the Iraq war, in 2003, Prime Minister Tony Blair of Britain addressed a joint session of Congress about America’s foreign policy mission: “In some small corner of this vast country, out in Nevada or Idaho or these places I’ve never been to but always wanted to go,” said Blair, “there’s a guy getting on with his life, perfectly happy, minding his own business, saying to you, the political leaders of this country, ‘Why me, and why us, and why America?’ And the only answer is, ‘Because destiny put you in this place in history, in this moment in time, and the task is yours to do.’”

Blair is still right about the role that destiny has placed on America’s shoulders, but years later it is also clear that many Americans are exhausted with that role.

After some four decades of a foreign policy built around “containment” of the Soviet Union, and then two decades of foreign policy built around “enlargement” — enlarging the sphere of democracy around the world with the huge excess of power America enjoyed after winning the Cold War — Americans want a break. President Trump is not wrong about that.

The job of the president, though, is to balance the understandable desire of Americans to no longer bear every burden and oppose any foe to ensure the survival of freedom with the fact that U.S. interests and values still require us to remain engaged around the world in a sustainable way.

But sustainable engagement requires us to do at least three things: make fine distinctions, leverage allies and amplify islands of decency. Alas, Trump violated all these principles in Syria.

First, Trump, and the U.S. military, missed the distinction between ISIS in Iraq and in Syria, and that’s because Trump and the Pentagon had put the war on terrorism on autopilot.

How so? It was quite logical that after ISIS emerged in Iraq and Syria in 2014 that the U.S. would take on the mission of helping to destroy ISIS in Iraq.

Washington felt guilty having removed all combat troops from Iraq before it was really stabilized and ISIS had brutally murdered American journalists. But rather than do it all ourselves, we partnered with the Iraqi Army and amplified its power and ground forces with our advisers and air power.

That approach led not only to the defeat of ISIS in Iraq, it also produced some unanticipated positive effects in Iraqi politics. The ISIS war became a kind of national war of liberation for Iraqis that brought moderate Iraqi Shiites, Sunnis and Kurds closer together — and gave them dignity that the U.S. invasion of Iraq had unintentionally stolen. And this paved the way for more stable and sustainable power-sharing among Sunnis, Kurds and Shiites in Iraq.

Iraq today remains a very frail democracy — with huge challenges in employment, energy, corruption and governing. But “Iraq today is a different country,” noted Linda Robinson in a recent essay in Foreign Affairs titled “Winning the Peace in Iraq: Don’t Give Up on Baghdad’s Fragile Democracy.” “Few Americans understand the remarkable success” that has been achieved in bringing Iraq back from the depth of the ISIS war.

This doesn’t mean that the original Iraq invasion was worth it or that we would do it again. But it does mean we found the right way to help Iraqis help themselves. It is now up to them to make the most of it.

Unfortunately, we kept the war on ISIS on autopilot. Once Iraq was liberated we tried to produce the same result in Syria using Syrian Kurdish fighters. We failed to make some important distinctions, though. As I argued in a 2017 column, ISIS in Syria was operating in a completely different context than in Iraq.

In Iraq, ISIS was the enemy of multisectarian democracy. In Syria, ISIS was the enemy of multisectarian democracy, and so were Russia, Shiite Iran, Shiite Hezbollah and the Shiite-Alawite Bashar al-Assad regime. And they and ISIS all deserved one another.

“If we defeat territorial ISIS in Syria now,” I wrote, “we will only reduce the pressure on Assad, Iran, Russia and Hezbollah and enable them to devote all their resources to crushing the last moderate rebels in Idlib, not sharing power with them.” And that’s basically what happened.

“ISIS was always two problems — Syria and Iraq — not one problem, and we should have treated them differently,” explained John Arquilla, a professor of strategy at the U.S. Naval Postgraduate School in Monterey. “In Iraq, ISIS had to be defeated, because once we broke Saddam’s regime, Iraq would either emerge as a liberal counterweight to Iran” — where power was stably shared among Sunnis, Shiites and Kurds — “or Iraq would become an Iranian puppet.”

In Syria, though, Arquilla added, “we could have protected the Kurds” and forced the Russians, Iranians, Hezbollah and al-Assad to have to keep ISIS bottled up there. But we were reflexive in just continuing the fight with ISIS into Syria, and not reflective.

In taking responsibility with the Kurds for defeating ISIS in Syria, we relieved Russia, Iran, Hezbollah and al-Assad of a huge burden, enabling them to crush the regime’s domestic rivals. And what’s really crazy is that — we did it for free! We didn’t even demand autonomy for our Syrian Kurdish allies or power-sharing with moderate Sunni Syrian rebels.

I feel terrible for the Kurds, but at least America might get the last laugh on Putin. Trump let Putin win Syria — and the indefinite task of propping up al-Assad’s genocidal regime and managing Iran’s attempts to use Syria as a platform to attack Israel. What’s second prize?

But even if you argue that walking away from the Kurds in Syria was the right coldblooded, strategic thing to do, how a president does things matters. By just pulling out of Syria without advance planning or coordination with our allies — and dumping the Syrian Kurds after they sacrificed 11,000 men and women in the fight against ISIS — we sent a message to every U.S. ally: “You’d better start making plans to take care of yourselves, because if Russia, China or Iran decides to come after you or bully you, America does not have your back — unless you’ve paid cash in advance.”

Watch out. Over time, that will not make for a more stable world or a cheaper U.S. foreign policy.

What makes America unique as a global power is that we have allies who share our interests and values — and amplify our power at a low cost to us — while Russia and China have only client states, like Syria, and customers.

“When we suddenly withdraw our support for an ally in one place — with no warning — we call into question our credibility everywhere,” argued Michael Mandelbaum, author of the book “The Rise and Fall of Peace on Earth.”

That is not an argument for sustaining bad wars forever, he added, like Vietnam. But it is an argument for ending them in ways that don’t unnerve your allies: “If the Germans and Japanese conclude that America’s security guarantees are no longer valid, they will each get nuclear weapons — which we don’t want and they don’t want.”

Finally, most everyone now understands (I certainly do) that we don’t have the time, patience, energy or know-how to create democracy in the Middle East. But what we can do and should do is amplify decency wherever we see it in hopes that the islands of decency there might one day connect up and flower into democracy.

For instance, Iraqi Kurdistan and the Syrian Kurdish regions, while they have plenty of corruption and tribalism, are nevertheless islands of decency where women tend to be more empowered, Islam is practiced in more moderate forms and Western liberal education is promoted in American-style universities. In just walking away from the Syrian Kurds, Trump has weakened their island of decency, rather than amplified it.

America is better than that, even if our current president is not.

*Thomas L. Friedman is the foreign affairs Op-Ed columnist. He joined the paper in 1981, and has won three Pulitzer Prizes. He is the author of seven books, including “From Beirut to Jerusalem,” which won the National Book Award.