President Donald Trump and Israeli Prime Minister Benjamin Netanyahu have lost control of the consequences of their war with Iran, according to a BBC analysis published Tuesday, with the Islamic Republic proving a far more resilient adversary than expected and the conflict settling into a grinding stalemate that has reshaped the Middle East in ways neither leader anticipated.

BBC International Editor Jeremy Bowen wrote that the risk now is of a long, attritional “permacrisis” that will lurch in and out of outright conflict. The assessment comes more than three months after the US and Israel launched their campaign against Iran on the last day of February, and as diplomatic efforts to reopen the Strait of Hormuz remain stalled.

“The Iranian regime has proved to be a much harder nut to crack than Trump and Netanyahu had assumed,” Bowen wrote. “Their judgement was wrong, and they have lost control of the consequences.”

Bowen pointed to Iran’s downing of a US Apache helicopter as the latest reminder that Iran’s rulers “can still hurt the Americans and will not budge in their determination to come out of this war on top.” The helicopter’s crew survived, Bowen noted, adding that had they been killed, a much harsher US response would have been likely.

Trump, Bowen wrote, has been banking on a deal with Iran to reopen the Strait of Hormuz and agree to longer-term talks over Iran’s nuclear program. The war is unpopular in America, and Trump wants a way out he can present as a victory, Bowen said — a challenge that is proving difficult.

“Ever since humans discovered the art and curse of war, leaders have found out that it is easier to start a war than to end one with a clear victory,” Bowen wrote.

When the US and Israel attacked Iran on Feb. 28, both Trump and Netanyahu issued video statements reflecting an assumption that the regime that has ruled Iran since the 1979 revolution was on the way out, Bowen wrote. Trump told Iranians that “the hour of your freedom is at hand” and urged them to “take over your government” after the bombing. Netanyahu said the coalition would “smite the terror regime hip and thigh,” fulfilling what he said he had yearned to do for 40 years.

Throughout his political life, Netanyahu has argued that the real threat to Israel comes from Iran, not from the Palestinians or Arab neighbors, Bowen wrote. He had tried and failed to get previous American presidents to join him in attacking Iran. Trump was different.

But Netanyahu’s strategy of using force to bend the region to his will has failed, Bowen wrote, citing Israeli newspaper columnist Ben Caspit, a vociferous critic of the prime minister, who said Netanyahu looked like “a deflated balloon” after Trump told him to cancel plans to attack Beirut on Monday.

Trump expected a quick victory, Bowen wrote, having watched with delight as the US military abducted Venezuelan President Nicolas Maduro and his wife and installed a compliant successor in Caracas. “Textbook regime change, he believed, way better than the forever wars fought by his predecessors in Iraq and Afghanistan. Iran would be next on the list.”

Both leaders underestimated the resilience, ruthlessness and guile of the Islamic regime, Bowen wrote. They believed that killing its supreme leader and his closest lieutenants would cause the regime to collapse from within. They overestimated the efficacy of military force against a regime that had faced repeated threats for almost 50 years and had engineered itself to survive an attack.

The Gulf oil states — allies of the US and, in the case of the UAE and Bahrain, of Israel too — have suffered hammer blows, Bowen wrote, not simply from lost petrochemical revenue but because the war has turned their vision of an oasis of stability and multi-billion-dollar business into a mirage.

The Iranian regime believes its survival and its chokehold on the world economy through the closure of the Strait of Hormuz can be translated into long-term deterrence, Bowen wrote. The men who have replaced the old guard of Iranian leaders killed by Israel and the US are just as ideological as their predecessors but much more willing to take risks in what they see as an existential struggle.

A key part of Iran’s strategy, Bowen wrote, is linking the war in Lebanon with the war in the Gulf. The regime’s message to Trump is that he cannot hope for any kind of deal if Israel continues to bomb Lebanon and try to destroy Hezbollah. By curbing Israel’s plans to attack Beirut on the grounds that a deal was near, Trump has implicitly accepted that link, Bowen wrote.

Netanyahu said Monday he would not accept the linkage, calling it “intolerable and completely unacceptable.” But Bowen wrote that Netanyahu’s problem is that Trump will put his own interests and desire to end the war ahead of Netanyahu’s determination to continue until he can declare the Islamic regime crippled.

The Strait of Hormuz, one of the world’s most strategic waterways, has remained closed since March. When it was shut, there were dire warnings of global economic consequences if it was still closed by June. It remains closed, and Bowen wrote that without remarkable diplomatic breakthroughs, it is hard to see it reopening any time soon.