Iran’s foreign minister flew to Beirut last week to bolster Lebanon and Hezbollah, the Iranian-backed militia and political group that plays a powerful role in the government. Both the militia and the government had been caught in a ferocious public backlash over the explosion that destroyed much of the city.
But almost as soon as he had landed, the foreign minister, Mohammad Javad Zarif, was blindsided by a new affront to Iran: a deal between two of Tehran’s chief regional rivals, Israel and the United Arab Emirates, to open formal diplomatic ties.
Together, the two developments amounted to another brutal month for the government of Iran after two very difficult years.
The Iranian economy has been driven to the brink of collapse by the Trump administration’s two-year-old campaign of economic sanctions. The Iranian military has been able to mount only token retaliation for a series of Israeli strikes on its assets in allied Syria, or for the American assassination last winter of a revered commander in Iraq.
Mr. Zarif, during his visit to Beirut, could do little more than bluster, warning other nations not to try to expand their own influence over Lebanon amid the chaos there. The Emirati pact with Israel was merely American-made “theater,” he proclaimed.
But after the Aug. 4 explosion that killed at least 175 people and wounded more than 6,000 in Beirut and the Emirati-Israel deal, “you could hardly write a script that was worse for Iran,” argued Ian Bremmer, the president of the Eurasia Group, a political risk consultancy.
By Saturday, some prominent Iranian politicians who support the regime were arguing that the Emirati agreement with Israel — forged out of mutual enmity for Iran — may mark a decisive turn against Tehran in a battle for public opinion across the region.
“In the eyes of the Arab street, Iran is now the enemy,” said Mohamad Ali Abtahi, a former vice president who sometimes speaks out against the government. “We are finding ourselves in a situation where our neighboring Arab countries are turning to Israel to confront Iran.”
It was only a decade ago that the fiery denunciations of Israel and Washington from senior Iranian leaders commanded admiring crowds on visits to Arab capitals across the region.
But that was before Iran intervened to help crush the Arab Spring uprising in Syria, before an upsurge in sectarian tensions spurred on by the political rivalry between Shiite-majority Iran and Sunni-majority neighbors, and before a wave of demonstrations by Iraqis and Lebanese protesting Iran’s interference in their domestic politics.
It was also before the pain of the Trump administration’s sanctions began to drain Iran’s generosity to its regional clients.
“We scared the Arabs and pushed them into Israel’s arms,” Ali Motahari, a conservative Iranian politician who supports the government, tweeted on Saturday.
In some ways, the agreement to open diplomatic ties between the U.A.E. and Israel was merely a public acknowledgment of what had been an open secret: Their military forces and intelligence agencies have cooperated closely for years against Iran.
Emirati officials said that in exchange for public recognition, Israel had agreed to retreat from a pledge to formally annex Palestinian territory in the West Bank. But critics noted that Israel’s leaders were only backing away from this temporarily and had their own reasons to do so.
Only two Arab states had previously recognized Israel — Egypt and Jordan. Both were far from Iran and motivated by the security of their own borders (as well as the good will of Washington).
The U.A.E., in contrast, is the only state among Iran’s Gulf neighbors to strike such an agreement, and the first to do primarily out of antagonism to Iran.
Iranian, Arab and Western analysts all predicted that other Gulf monarchies would soon follow suit, with Bahrain and Oman considered prime candidates. Oman, which has sometimes positioned itself as a relatively neutral intermediary between Iran and its Arab rivals, raised speculation two years ago by hosting a visit by Israeli Prime Minister Benjamin Netanyahu.
More immediately, Iranian analysts said they feared that greater access to the U.A.E.’s commercial center in Dubai could also provide special advantages to Israeli attempts to spy on Iran. The rulers of the U.A.E. are fierce critics of the rulers of Iran, but many Iranians do business or spend time in Dubai (which appears to receive a de facto exemption from American sanctions).
As a result, Dubai could now become the first place in decades where large numbers of Iranians and Israelis may be mixing.
Iranian President Hassan Rouhani warned the Emiratis not to let Israel “gain a foothold in the region.”
“Beware that then we would act and deal with them differently,” he said in a speech on Saturday.
Yet Iranian officials gave no indication that they were preparing to punish the U.A.E., or to risk cutting off trade or diplomatic ties. Given the longstanding Iranian economic ties to the U.A.E. and the weakness of the Iranian economy, analysts said Iran had little choice.
Several argued the full impact on Iran of the Emirati-Israeli agreement would become clear only over time.
“Is the U.A.E. going to be more publicly supportive of Israeli bombing of Iranian installations in Syria, or of Israeli efforts to thwart Hezbollah?,” asked Sanam Vakil, a scholar at Chatham House, in London. “Is Israel going to defend the U.A.E. in the face of Iranian aggression? All this seems really opaque right now.”
The threat of a regional reshuffling, though, can only complicate Iran’s efforts to shore up its influence through Shiite Hezbollah in Lebanon, a country that Iranian officials often refer to as “our southern border” or “our border with Israel.”
“Lebanon’s security is our security,” Mr. Zarif told Lebanese journalists during his visit this week.
But if Hezbollah’s Iranian-supplied weaponry has sometimes provided Tehran with tacit leverage against Israel, the domestic crisis inside Lebanon has now fully consumed the movement’s energies and muted any such threat.
“Iran and Hezbollah are very boxed in as a result of the explosion,” Ms. Vakil of Chatham House said. “There is no way Iran can count on Hezbollah to rain any of its missiles and rockets down on Israel right now. There will be absolutely no appetite and no support for any such adventurism.”
After a 2006 war in Lebanon between Hezbollah and Israel, Iran rushed to hand out donations to local Lebanese businesses and individual to pay for reconstruction, bolstering its influence.
But after the explosion last week, Iran’s patronage was more thrifty.
The Iranian Red Crescent announced that it had delivered 95 tons of food and medical aid, along with a 37-member medical team to open a field hospital. (A Hezbollah-linked municipal association said last week that it would send aid teams to help clean up a predominantly Christian neighborhood. But angry residents scuttled the plan.)
Mr. Zarif’s warning to other nations not to try to amp up their influence in Lebanon amid the turmoil there was a tacit jab at President Emmanuel Macron of France, the former colonial ruler of Lebanon. Mr. Macron had just flown into Beirut to lead international efforts to finance reconstruction, assuming a role Iran had previously sought as Lebanon’s benevolent patron.
Mr. Macron also urged the formation of a new, technocratic government, which could have the side effect of diminishing the influence of Iran and its proxy, Hezbollah.
Outraged Iranian commentators berated Mr. Macron for dominating the scene, accusing him of forgetting Lebanon’s independence from France. But Hezbollah’s leader, Hassan Nasrallah, bucking the Iranian view, sent representatives to meet with Mr. Macron and publicly welcomed the help.
Sadegh Zibakalam, a political analyst in Tehran who is an outspoken critic of government policies, saw parallels among Mr. Macron’s visit to Lebanon, Iran’s inability to stop Israeli airstrikes against its positions in Syria, and the recent selection of an American-backed prime minister in neighboring Iraq.
Tehran had poured resources into allied militias and parties in all three countries, he noted, as part of what Iranian officials call “resistance” to the United States and Israel.
Now the setbacks in Lebanon, Syria and Iraq, he argued, were demonstrating “the results of investing billions of dollars in the strategy of resistance.”