Want to listen to this article out loud? Hear it on Slate Voice.

Despite the Trump administration’s declared intention of isolating Iran and rolling back its influence in the Middle East, things are continuing to work out pretty well for Tehran’s regional ambitions.

On Sunday, ISIS agreed to a cease-fire in an area along the Lebanon-Syria border where militants had been fighting against simultaneous offensives by the Lebanese Army, the Syrian army, and Hezbollah, an Iranian-backed militia. While there’s no official cooperation between the Lebanese military—a major recipient of U.S. military aid—and Hezbollah—considered a terrorist organization by the U.S. government—they were certainly working toward a common goal of defeating ISIS. The agreement highlights the degree to which Hezbollah and other Iranian-backed groups are increasing their power and influence in Syria now that the various rebel factions are on their heels and Iranian-backed President Bashar al-Assad’s position looks assured. (Western diplomats, including those from the U.S., are now urging what’s left of the country’s opposition to come to terms with Assad remaining in power.)

Iran also notched a win in the Persian Gulf last week when Qatar announced it was restoring diplomatic relations with the Islamic Republic. Relations were severed by Qatar in 2016 in solidarity with Saudi Arabia after the ransacking of the Saudi embassy in Tehran, but Qatar has also been more independent in its foreign policy and much friendlier to Iran than its Gulf neighbors. The latest decision defies efforts by Saudi Arabia and its allies to isolate Qatar in part over its Iranian ties. Those efforts, made with Trump’s blessing, have backfired: Qatar hasn’t backed down and has become increasingly reliant on trade with Iran.

Another of Iran’s erstwhile friends, the Palestinian militant group Hamas, announced Monday that it also is restoring relations with Iran, which had been strained over Hamas’ support for the rebels in the Syrian civil war.

Here’s another win: The International Atomic Energy Agency is issuing a report in a few days which is expected to show that Iran is mostly complying with the 2015 nuclear deal. U.S. intelligence officials have reached the same conclusion, and Trump has now twice certified, with extreme reluctance, that Iran is in compliance, something he is required to do every 90 days. While Trump has said he doesn’t want to do that again, the departure of hard-line enablers Steve Bannon and Sebastian Gorka makes it less likely he will simply blow up the deal. The more likely tactic is to push for stronger and stronger inspections within the framework of the deal, as Ambassador to the U.N. Nikki Haley proposed on Friday. If Iran were to balk at the inspections, it would give Trump pretext to blame Iran for the collapse of the deal. There are also reports of the Trump administration pressuring U.S. intelligence officials to find justification to declare Iran in violation, bringing back bad memories of the manipulation of intelligence in the lead-up to the 2003 Iraq war.

The problem with this strategy is that it’s obvious to everyone, in large part because of Trump’s own statements, that he’s desperate to find a reason to kill the deal. If he were to succeed, European countries—never mind China and Russia—are unlikely to follow the United States’ lead and restore sanctions on Iran.

Once again, while the U.S. struggles to exert an ill-formulated foreign policy, Iran proves to have the upper hand.