Last week I noted that President Biden was facing early tests in the Middle East, and the world would be watching how he responded. It’s too early for a final grade, but so far he is passing his early tests with flying colors.

The first test has been posed by Iran. Since Biden’s inauguration, Iranian-backed forces have been accused of staging drone and missile attacks on Saudi airports and even a royal complex in Riyadh; killing a prominent anti-Hezbollah dissident in Lebanon; and firing rockets at a U.S. air base in northern Iraq, killing a Filipino contractor and injuring a U.S. service member.

These types of attacks are not a new development; they were a regular feature of the Trump presidency too. In December, for example, Iranian-backed groups fired at the U.S. Embassy in Baghdad with 21 missiles. In June, the Iranian-backed Houthis staged a drone and missile attack on Riyadh, and in November they hit a Saudi oil storage facility. An even more massive Iranian-backed strike on Saudi oil facilities in 2019 temporarily cut the kingdom’s oil output in half.

But if Biden did nothing in response to the latest Iranian provocations, he would have risked sending a message of weakness that would have further emboldened Tehran — and played into unfair Republican accusations that he is appeasing the mullahs. On Thursday, Biden ordered the right response: an airstrike on a Syrian base used by Iranian-backed militias, including Kataib Hezbollah and Kataib Sayyid al-Shuhada. The Syrian Observatory for Human Rights reported that at least 17 pro-Iran fighters had been killed.

Notably, and mercifully, absent was any of Donald Trump’s bloodthirsty rhetoric or juvenile taunts. Instead the White House left it to the Pentagon to announce the airstrike with a low-key statement: “President Biden will act to protect American and coalition personnel. We have acted in a deliberate manner that aims to de-escalate the overall situation in both eastern Syria and Iraq.”

This is exactly the right tone to strike. Biden is laying down important red lines by telling Tehran that it cannot attack the United States or its allies with impunity, and it certainly cannot kill U.S. personnel. But Biden is also signaling that he does not want war, and he wants to resume nuclear negotiations. Indeed, this is the only way to deal with the Iranian threat: We need a two-track approach that tries to reassemble an international agreement to stop Iran’s nuclear weapons development while engaging in a policy of active containment and deterrence to curb Iran’s destabilizing activities in the region.

Trump, by contrast, sabotaged nuclear diplomacy and raised the risk of war without having any appreciable success in curbing Iran’s regional aggression. His approach was billed as toughness, but it was simply incoherent and unsuccessful.

Trump seemed to have imagined that Saudi Arabia would contain Iranian power with U.S. backing, but this was another flawed assumption. The Saudi-backed war in Yemen has produced one of the worst humanitarian crises in the world — but hasn’t defeated the Houthis or even slowed their advance. Yemen has become known as the Saudis’ Vietnam War.

But this was only part of the price of giving the Saudis a blank check. Trump and his clueless son-in-law, Jared Kushner, looked the other way as their buddy, Saudi Crown Prince Mohammed bin Salman, engaged in other reckless behavior — which included kidnapping the prime minister of Lebanon, holding for ransom the kingdom’s richest men, locking up moderate dissidents, and sending a hit team to murder and dismember Post contributor Jamal Khashoggi. MBS, as the prince is known, hasn’t been all bad: He’s also allowed women to drive and started to scrub Saudi textbooks of anti-Semitic and misogynistic language. But on the whole, the crown prince has been a dangerous loose cannon.

Biden is now acting to bring MBS under control. He has already ended U.S. support for the failed Saudi war effort in Yemen, and announced he is reviewing U.S. arms sales to the Saudis. On Friday he complied with a congressional mandate, which Trump ignored, to release the findings of the U.S. intelligence community about MBS’s responsibility for Khashoggi’s murder. Prior to releasing the Khashoggi report, Biden on Thursday called the Saudi head of state — not the crown prince but his father, King Salman. That calculated snub shows MBS that he has lost the direct link to the White House that he enjoyed in the Trump era.

It is disappointing but probably inevitable that Biden won’t sanction MBS personally; there is no precedent for such action against the de facto ruler of a U.S. ally. But at least 76 Saudis will face travel bans to the United States for threatening dissidents overseas — and the “Khashoggi ban” will extend to other officials around the world involved in state-sponsored efforts to harm dissidents. Biden can’t sever the U.S.-Saudi alliance, but he is “recalibrating” it.

It is still early days, and a lot could (and probably will)still go wrong, but so far Biden is off to an excellent start in a region that has proved a morass for U.S. presidents since Jimmy Carter. Biden is showing that he is just as tough as Trump — tougher, in fact, when it comes to dealing with “frenemies” such as Saudi Arabia — but far smarter. Biden actually seems to have a strategy, not just a Twitter account.

Read more: