A CENTRAL goal of U.S. policy in the Middle East ought to be promoting a balance among its competing powers that favors core U.S. interests: peace, including with Israel; economic modernization; and religious tolerance and human rights. President Barack Obama espoused that agenda even if, in practice, he made grievous errors. President Trump, in contrast, has chosen to side unequivocally and uncritically with one of the region’s axes, led by Saudi Arabia and its Sunni allies and tacitly supported by Israel. That has enabled a series of disasters, including the world’s worst humanitarian crisis, in Yemen, and the murder of journalist Jamal Khashoggi — and the worst may be yet to come.

The world’s most turbulent region is moved in part by a sectarian conflict between Shiites and Sunnis, extending from Iraq to Lebanon and from Syria to Yemen. Iran, the leader of the Shiite bloc, is attempting to establish itself as the regional hegemon by waging war through proxies and by pursuing the capacity for nuclear weapons. Its aggression must be resisted, but not by aligning the United States with a Sunni sectarian jihad against Shiites.

The Sunnis, for their part, are divided between nationalist autocrats, such as Egypt’s Abdel Fatah al-Sissi and Saudi Crown Prince Mohammed bin Salman, and those sympathetic to political Islam, including Qatar and Turkey’s Recep Tayyip Erdogan. Here, too, the Trump administration has unwisely tilted toward one side — that of the Saudis — when the right U.S. policy would be to push both camps to embrace tolerance and steps toward democracy.

The balance is a hard one to strike, and the Obama administration often got it wrong. It allowed its agenda to be dominated by the pursuit of the flawed deal temporarily limiting Iran’s nuclear program. To achieve that, it backed away from resisting Iranian aggression in Syria; it also convinced itself, wrongly, that Iran could be coaxed into giving up its imperial ambitions. Mr. Obama was frequently at odds with the Saudi and Israeli governments — but in an inept effort to balance the Iran deal, he initially supported a disastrous Saudi bombing campaign in Yemen and agreed to sell the kingdom more than $100 billion in weapons.

Mr. Trump arrived in office eager to reverse Mr. Obama’s legacies — and he was quickly seduced by a shrewd Saudi lobbying campaign. He embraced Mohammed bin Salman in a way that encouraged him to believe he would have Washington’s support in reckless adventures such as his boycott of Qatar and escalation of the Yemen war. The crown prince was reportedly shocked and angered when what the regime now acknowledges as the premeditated murder of Mr. Khashoggi prompted a rebuke from the White House.

Mr. Trump’s decision to renounce the nuclear deal and reimpose sanctions on Iran as of Nov. 4 will escalate tensions in the region without a clear purpose. Regime change in Tehran doesn’t look likely in the near term, nor does the elimination of Iran as a regional force; that Saudi and Israeli goal would require the United States to go to war.

The best U.S. policy would push back against Iranian aggression where it matters most, in Syria, while also seeking to contain the excesses of the Sunni states. That could start in Yemen, where an end to U.S. military support for the Saudi coalition could help jump-start U.N.-sponsored peace talks. Mr. Trump ought to accept that an effective U.S. policy in the Middle East cannot consist of the demonization of Iran and the indiscriminate embrace of Iran’s enemies.

Read more:

The Post’s View: Saudi Arabia admits Khashoggi’s murder was premeditated. Fine. Who premeditated it?

David Ignatius: Why was MBS so afraid of Jamal Khashoggi?

Jason Rezaian: It’s time to end America’s double standard on Iran and Saudi Arabia

Charles Krauthammer: The great Muslim civil war — and us

Josh Rogin: Trump’s only foreign policy doctrine is Trumpism