It was just five years ago that an American president, faced with a crisis on Syria’s border, acted decisively and honorably.

Barack Obama responded with airstrikes and a rescue operation in 2014 when the Islamic State started a genocide against members of the Yazidi sect, slaughtering men and forcing women and girls into sexual slavery. Obama’s action, along with a heroic intervention by Kurdish fighters, saved tens of thousands of Yazidi lives.

“While America has never been able to right every wrong, America has made the world a more secure and prosperous place,” Obama declared at the time. “And our leadership is necessary to underwrite the global security and prosperity that our children and our grandchildren will depend upon.”

Contrast Obama’s move, successfully working with allies to avert a genocide, with President Trump’s betrayal this month of those same Kurdish partners in a way that handed a victory to the Islamic State, Turkey, Syria, Iran — and, of course, Russia, because almost everything Trump does seems to end up benefiting Moscow.

“Who can trust Trump’s America?” The Economist magazine asks on its newest cover. Senator Mitt Romney, Republican of Utah, added: “What we have done to the Kurds will stand as a bloodstain in the annals of American history.”

Trump doubled down by saying that the Kurds were “no angels” and compared the fighting in Syria that he unleashed — with hundreds dead and 300,000 displaced — to a couple of kids fighting in a vacant lot. His own former special envoy, Brett McGurk, responded on Twitter: “This is an obscene and ignorant statement.”

Given the Kurdish heroism in arresting genocide against the Yazidi in 2014, it is savagely ironic that Trump’s betrayal has now put the Kurds themselves at risk of war crimes and ethnic cleansing by Turkey. Gunmen backed by Turkey dragged a female Kurdish politician, Hevrin Khalaf, from her car by her hair, beat her and broke her legs, facial bones and skull, and then shot her dead. When a friend called her phone afterward, a man answered and said, “You Kurds are traitors,” according to Amnesty International, which also said Turkish military forces and a coalition of Turkey-backed Syrian armed groups have carried out war crimes.

There also are reports of Turkish-backed forces using white phosphorus or napalm on civilians, and that’s after the supposed cease-fire that Vice President Mike Pence claimed to have reached with Turkey. It’s nauseating to hear Trump claim that this cave-in represents “a great day for civilization” and that “millions of lives will be saved.”

A former United Nations official emailed me, aghast, to compare the deal to the 1938 Munich Agreement “peace for our time.” He added that even Neville Chamberlain never agreed to help move the Czechs out of Sudetenland.

Trump has emphasized his desire to bring American troops home, and that’s a perfectly reasonable aspiration if undertaken in a prudent way. But even as Trump abandoned the Kurds and unleashed this disaster, he was actually increasing the number of American soldiers in the Middle East — sending some 3,000 additional troops to Saudi Arabia.

So we’re sending more troops to Saudi Arabia to help a misogynist dictatorship that kills a journalist for an American newspaper, even as we betray the Kurds who have been trying to build a democratic enclave that empowers women; we’re sending troops to Saudi Arabia to confront Iran, even as we give Iran a helping hand in Syria.

This is where incoherence and inhumanity converge.

“Foreign policy is what I’ll be remembered for,” Trump boasted in 2017 to my colleague David E. Sanger. Well, um, yes.

By failing to prepare for a phone call with Turkey’s leader, and then allowing himself to be manipulated, Trump undid years of work in the Middle East. But he also is corroding the entire 75-year-old American postwar international order, built on American credibility and values. Everyone knew that the United States did not always live up to its rhetoric but also that its ideals and commitments counted for something. Until now.

I began this column with a note of praise for Obama for confronting the Yazidi genocide and saving many lives. It’s also true that Syria was Obama’s greatest foreign policy failure, and I repeatedly criticized his passivity as hundreds of thousands were killed.

Yet at least Obama was always wrestling deeply with the issues, seeking out expert opinions and trying to make the most informed decisions possible. While I questioned his judgment on Syria, I never doubted his seriousness, compassion or integrity.Trump in contrast is callow, reckless and indifferent. What he has done in Syria is not foreign policy. It is vandalism.

Nicolas Kristof is a columnist for the New York Times.