Arab countries, from the United Arab Emirates and Oman to Jordan and Egypt, have tried for months to tamp down the conflict between Israel and Hamas, especially after it widened to include armed groups backed by Iran and embedded deep within the Arab world. Some of them, like the Houthis, threaten Arab governments as well.

But the Iranian drone and missile attack on Israel over the weekend, which put the entire region on alert, made the new reality unavoidable: Unlike past Israeli-Palestinian conflicts, and even those involving Israel and Lebanon or Syria, this one keeps expanding.

“Part of why these wars were contained was that they were not a direct confrontation between Israel and Iran,” said Randa Slim, a senior fellow at the Washington-based Middle East Institute. “But now we are entering this era where a direct confrontation between Israel and Iran — that could drag the region into the conflict and that could drag the U.S. in — now that prospect of a regional war is going to be on the table all the time.”

For the moment, the only countervailing force is the desire of both the United States and its longtime foe Iran to avoid a widening of the conflict, said Joost Hiltermann, the International Crisis Group’s program director for the Middle East and North Africa.

“I am heartened by the fact that the only ones who want a war are Israel and Hamas,” he said. “The Iranians are still talking to the Americans,” he said, referring to messages sent in recent days between the two by intermediaries including Switzerland and Oman.

The Iranian message, said Mr. Hiltermann, made clear they were looking to demonstrate their power, not expand the war. “They said, ‘There is going to be an attack, but we are going to keep it limited.’”

Still, for citizens of Arab countries, many of whom watched scores of drones and missiles streaking across their skies on Saturday, professions of desire to avoid a wider war are a slender thread on which to hang their future. Dismay over the attack was evident in many public comments, and in private ones, too, though others celebrated it.

Officials and analysts in the region were divided over whether Iran’s attack would spur countries with longstanding ties to the United States to push for still more engagement — and security guarantees — from Washington or to distance themselves in an effort to keep themselves safe from being attacked by Iran themselves.

Most urged de-escalation in the strongest terms. The only exceptions in the Arab world were northern Yemen, whose de facto Houthi government is close to Iran, and Lebanon, home to Hezbollah, the armed group backed by the Iranians.

Oman said that it was crucial to reach an immediate cease-fire in the war between Israel and Hamas that has been raging for the past half year in the Gaza Strip. Kuwait “stressed the necessity of addressing root causes” of the region’s conflicts.

And Saudi Arabia, which has tried to cultivate relatively warm ties with Iran since the two countries re-established diplomatic relations last year, said it was “extremely concerned” about the dangerous implications of the military escalation in the region. A statement from its Foreign Ministry asked everyone involved “to exercise maximum restraint and to protect the region and its people from the dangers of war.”

Even before the Hamas-led attack on Israel that set off the war in Gaza on Oct. 7, Arab countries had been adjusting their geopolitical relationships. Their concern was that they might no longer be able to count on a U.S. government increasingly focused on Asia as Iranian-backed armed groups became increasingly active.

Arab leaders’ discomfort only increased with the Israeli assault in Gaza, which the United States defended but their own citizens found abhorrent, said Renad Mansour, a senior research fellow at Chatham House’s Middle East and North Africa program.

For Saudi Arabia, this meant forging a diplomatic relationship with Iran, despite their deeply held antagonisms and attacks carried out with Iranian missiles on Saudi infrastructure as recently as 2019. Saudi Arabia’s approach to Iran was facilitated by China, which has recently worked to expand its influence in the region. Many Arab countries have turned to China in pursuit of business and diplomatic ties.

Then the war in Gaza began, dragging the Gulf states, along with Egypt and Jordan, more directly into the dynamics of a conflict they have wanted desperately to avoid.

Now, Jordan has found itself shooting down Iranian missiles — and then being accused of defending Israel. The Israeli military assault on Gaza, often accused of being indiscriminate, has killed more than 30,000 Palestinians, more than two-thirds of them women and children. Some 1,200 people were killed in Israel in the Hamas attack.

On Sunday, Jordan’s government came under sharp criticism both at home and from neighboring Arab countries for shooting down at least one of the Iranian missiles aimed at Israel. A former Jordanian information minister, Samih al-Maaytah, defended the decision.

“Jordan’s duty is to protect its lands and citizens,” Mr. al-Maaytah said. “What Jordan did yesterday was to simply protect its airspace.”

He also said that “Jordan’s position on this conflict is that it is between two parties over influence and interests: Iran and Israel.”

While the Gulf countries’ petroleum exports have been largely spared from attacks as they are shipped through the Persian Gulf the Red Sea, the Houthi attacks on shipping routes there — tied to the war in Gaza — have raised costs and added to tensions.

It is unclear whether the conflict between Israel and Iran will strain further the relatively new ties between Israel and some Arab states. Since the war in Gaza began, those relations have cooled, but it seems none of the Arab governments that recently forged ties with Israel are ready to abandon them entirely.

Two of the countries that signed the Abraham accords normalizing relations with Israel in 2020 — the United Arab Emirates and Bahrain — have in some cases halted business deals or distanced themselves publicly from that country since the war in Gaza began. And Saudi Arabia, which had been exploring the possibility of diplomatic normalization with Israel, has insisted that any deal would require creating an “irreversible” pathway to a Palestinian state, an unlikely prospect in the current Israeli political climate.

That distancing is likely to continue, analysts say, but so far none have cut off relations with Israel or, in Saudi Arabia’s case, completely ruled them out.

One reason Saudi Arabia has remained open to a future relationship with Israel is that now more than ever, the Saudis are hoping for a security guarantee from the United States in the event of an attack by Iran, said Yasmine Farouk, a nonresident scholar at the Carnegie Endowment for International Peace, a Washington research group.

“What the Western countries under U.S. leadership have done to protect Israel yesterday is exactly what Saudi Arabia wants for itself,” Ms. Farouk said.

She added that despite Saudi Arabia’s history of enmity with Iran, the hardening of Saudi public opinion against Israel and the United States over the Gaza war is changing the calculations of Saudi leaders. Their focus is now on pushing the United States to compel Israel to end the war.

Perhaps the most striking development in the region is the growing push by some Arab countries to be part of forging diplomatic solutions to avoid having the region descend into a broader war. Arab countries held a conference in Riyadh in November to discuss how to best use their influence to stop the conflict.

Qatar and Oman have become ever more active behind the scenes in seeking to bring about a cease-fire in Israel and renew diplomatic efforts between Iran and the United States to prevent the outbreak of a destabilizing broader conflict.

Qatar’s close relations with Hamas, Iran and the United States have made its ministers and senior officials pivotal in shuttle diplomacy. And Oman has become a conduit for messages between the United States and Iran. In just the past few days, Washington has communicated with Tehran through messages conveyed by the Omanis as well as the Swiss, according to a senior security official in Iraq and a senior U.S. administration official in Washington, who spoke on the condition of anonymity because they were not authorized to speak publicly.

The new question, said Ms. Slim of the Middle East Institute, is what country can play the role of middleman and negotiator between Israel and Iran.

“The rules have changed, the red lines have changed and they need to be able to communicate,” Ms. Slim said.

Hwaida Saad and Eric Schmitt contributed reporting.

world