The time is the early 1980s. The place is the South China Sea. A sailor aboard the U.S.S. Midway, an aircraft carrier, spots a leaky boat jammed with people fleeing tyranny in Indochina. As he helps bring the desperate refugees to safety, one of them calls out: “Hello, American sailor — Hello, Freedom Man.”

It’s the sort of story Americans used to like hearing about themselves. So much so, in fact, that Ronald Reagan told it in his 1989 farewell address, by way of underscoring how much went right for the United States when, as he put it, “We stood, again, for freedom.”

Not anymore. When the world looks at the United States today, it sings a sorry song. Goodbye America. Goodbye, Freedom Man.

That’s the global lesson from the regional catastrophe that is Donald Trump’s retreat in Syria. The president made his case, as he usually does, in a series of tweets this week. Like their author, the tweets were, by turns, sophomoric and self-important, flippant and destructive.

He praised the Kurds as “special people and wonderful fighters” who “in no way have we Abandoned” — and yet he abandoned them.

He praised Turkey for being “good to deal with” and “an important member in good standing of NATO” — after warning that he would “totally destroy and obliterate” its economy if it did anything he didn’t like.

He boasted that “The stupid endless wars, for us, are ending!” — but took the one step most likely to speed their resumption and expansion.

And he congratulated himself for his “great and unmatched wisdom.” Of course.

Closer to the mark in assessing the results of American withdrawal was Javad Zarif, the Iranian foreign minister, who said of the U.S. that it was “futile to seek its permission or rely on it for security.”

To survive the Turkish onslaught, the Kurdish forces we have cavalierly betrayed will now have little choice except to try to reach an accommodation with Bashar Assad. This will allow the Damascene dictator to consolidate his grip on the country he has brutalized for nearly 20 years — demonstrating to autocrats everywhere that using sarin gas, barrel bombs, hunger blockades, and every other barbaric method against defenseless civilians pays.

It will do worse than that.

It will put thousands of Kurdish lives in jeopardy. It will deepen Tehran’s influence in Syria. It will increase the likelihood of all-out war between Israel and Iran. It will underscore the inefficacy of U.S. sanctions to curb Tehran’s ambitions. It will ratify the wisdom of Vladimir Putin’s decision to intervene on Assad’s behalf. It will strengthen Turkish strongman Recep Tayyip Erdogan’s hand, not only in northern Syria but also in Turkish politics, just as he was finally beginning to experience serious reversals after 16 years in power.

And it will fundamentally jeopardize the gains made against the Islamic State, around 10,000 of whose fighters are in the custody of the Kurdish forces now being attacked. As Mazloum Abdi, the commander of the Kurdish-led Syrian Democratic Forces, told Bloomberg’s Eli Lake, “If we think the Turkish operation will not stop, we cannot fight ISIS anymore.”

Trump thus repeats Barack Obama’s mistake in Iraq of declaring success, pulling out, and creating the security and political vacuums which ISIS, Iran, and other bad actors were quick to fill. That alone should have been enough to dissuade this president from pursuing his course.

Except that Trump’s instinctive need to appease dictators appears to be even more powerful than his aversion to imitating his predecessor. Distracting attention from impeachment surely played a role, too, based on the view that ending “stupid endless wars” is generally a political winner — at least until the consequences of our geopolitical fecklessness are again felt fatally at home.

All of which makes it noteworthy that Trump’s Kurdish betrayal has elicited such a political backlash, including among some of his more reliable lackeys in the Republican caucus. People like Sen. Lindsey Graham understand that what the U.S. is now doing isn’t simply foreign policy folly. It’s a national disgrace.

It’s a signal that Americans are the friends you never want: there for you when, and only when, it’s convenient for them. It’s evidence that our moral values are tissue paper around the glass fragments of our president’s ego. It’s proof that the idealism that stormed Normandy, fed Europe, democratized Japan, and kept West Berlin free belongs to an increasingly remote past.

It means that American sailor or soldier seen on the horizon is no longer “freedom man.” He’s fair-weather friend.

Even now, this is not how most Americans, including many of Trump’s supporters, would wish to see themselves. People on their way to the bottom have their occasional moments of clarity, seldom seized. In the Syria debacle, Republicans have a chance to see, if not save, themselves.

Bret Stephens | The New York Times, (Tony Cenicola/The New York Times)

Bret Stephens is an Op-Ed columnist for The New York Times.