The Middle East could be on the verge of a regional conflagration. That’s in stark contrast to the atmosphere of just a few weeks ago, when the Biden administration was working on sealing a historic deal between Saudi Arabia and Israel that it hoped would stabilize a region long convulsed by war and sectarianism.

Now, in the wake of Hamas’s Oct. 7 attack, Israel appears to be preparing to invade Gaza. Israeli forces and the Iranian-backed militant group Hezbollah are firing at each other at the Lebanon border. Protests have erupted in cities across the region. The United States has moved two carrier strike groups into the eastern Mediterranean, and on Thursday a Navy warship shot down missiles and drones from Yemen that the military says may have been headed toward Israel. In a sign that the Pentagon expects similar attacks in the days ahead, on Saturday the U.S. military said it would increase its missile defense capability in the region to help protect U.S. forces.

At the center of these mounting tensions is Iran, which has been engaged in a shadow war with its chief regional rival, Israel, for years. On Oct. 10, Iran’s supreme leader, Ayatollah Ali Khamenei, applauded the deadly terrorist attack by Hamas, which is part of a loose network of nonstate armed groups that Iran uses to bolster its influence in the region. Tehran has denied any involvement in the attack, and Israeli and American officials acknowledge that there is no “direct evidence” proving otherwise. But as Iran rages over the ever-mounting casualties in Gaza and what it perceives as America’s interference, fears are growing that this on-again-off-again proxy war, waged through Hamas in the south and Hezbollah in the north, will break out into a sustained conflict, potentially even dragging in the United States.

Iran may not have ordered Hamas’s attack, but government officials in Washington believe Tehran bears responsibility for enabling Hamas to gain the military capability and expertise to carry out the complex attack that has killed at least 1,400 Israelis and captured some 200 hostages. Days after the attack, Washington and Doha, Qatar, announced that Tehran would be denied access to $6 billion that had been recently unfrozen as a result of a prisoner swap between the United States and Iran.

Each year, Iran doles out hundreds of millions of dollars to improve the combat effectiveness of Hezbollah, Hamas and other militant groups in the region, including the Houthis in Yemen and an assortment of Iraqi Shia militias. With that funding, the groups, which Tehran has supported for decades as part of its “axis of resistance,” have developed an extensive assortment of capabilities, ranging from unmanned aerial systems to high-end ballistic missile arsenals that would be the envy of most national militaries.

Training and equipping terrorists, insurgents and militias is a core element of Iran’s foreign and security policy in the Middle East. At the vanguard of this effort is the Islamic Revolutionary Guards Corps-Quds Force, an elite unit responsible for conducting covert activities, including the sponsorship of groups like Hamas. IRGC-QF trainers and advisers provide hands-on instruction to militants on how to plan ambushes, improve operational security and gain proficiency with emerging technologies and cutting-edge weapons systems. The success of this training was evident in the way Hamas used drones to knock out the Israel Defense Force’s cellular communications and surveillance towers along the border with Gaza in its recent attack.

Iran uses proxy forces to advance its national security objectives: pushing adversaries like the United States, which has more than 30,000 troops stationed across various facilities in the Middle East, out of the region and expanding its own sphere of influence without generating a direct military response from rivals. Proxy forces allow Tehran to meddle in ongoing conflicts in the background, maintaining a thin veneer of deniability and avoiding being pulled into a direct military confrontation with militarily superior foes — namely, Israel and the United States. It also gives Tehran leverage as its proxy groups develop political wings, helping Iran play kingmaker in local and national politics in Iraq, Lebanon, Yemen and elsewhere.

These proxy-war tactics have been a success. Hamas and Hezbollah have inflicted serious damage in Israel without bringing the war home to Iran and have sent a clear message to Jerusalem that Tehran, if it wants to, is able to wage a campaign of asymmetric warfare that combines conventional and unconventional military capabilities.

But that paradigm may be about to change.

Many longtime Middle East watchers believe that the driving force behind Hamas’s attack was an overarching imperative — from both Hamas leadership and Tehran — to disrupt the momentum of the normalization agreement between Israel and Iran’s other longtime nemesis in the region, Saudi Arabia. And it may have worked. The images of death and destruction coming out of Gaza and the mounting death toll of Palestinian civilians could ultimately prove to be too much for Saudi Arabia to ignore. For the time being, any normalization talks between Saudi Arabia and Israel have been shelved.

But Tehran has gone much further than disrupting talks. The IRGC-QF commander, Gen. Ismail Qaani, appears to be coordinating Iran’s various proxy forces more closely, even reportedly organizing regular meetings since August between the heads of Hezbollah, Hamas and Palestinian Islamic Jihad, another militant group that is active in Gaza. Accordingly, the fighting since Oct. 7 has not been limited to Gaza. Israel has launched strikes into Lebanon in response to Hezbollah missiles that have been fired into its territory. The exchange so far has followed a long-running pattern of tit-for-tat reprisals. Still, Israel, concerned that Hezbollah fighters may be preparing to ramp up attacks and launch a sustained offensive in response to an Israeli ground invasion of Gaza, has announced the evacuation of more than two dozen communities along its border with Lebanon, including one small city of some 20,000 residents.

As the conflict intensifies, there are growing concerns that Israel may be headed toward a more direct confrontation with Iran. U.S. military stationed in the region have also faced threats from Iran-backed groups in recent days. On Oct. 17, after scores of Palestinians were killed in a hospital bombing, Ayatollah Khamenei accused the United States of fomenting the chaos that is threatening to envelop the region, taking to X, the social media site formerly known as Twitter: “The Zionist regime’s policy is being regulated by the Americans,” he said. “The U.S. is responsible for the recent crimes.”

And while the Biden administration provided evidence, based on the intelligence it has seen, that the hospital strike was an errant Palestinian Islamic Jihad rocket, the fuse has already been lit, with protests continuing throughout the region. Protesters tried to storm the Israeli embassy in Amman, Jordan, and violent demonstrators targeted the Israeli consulate in Istanbul.

If Hezbollah decides to take advantage of the overstretched Israeli Defense Forces and officially open up a second front on Israel’s northern border, the situation could escalate — and deteriorate — quickly. Even the slightest miscalculation by Iran or one of its proxies could result in a dramatic response by the Israelis, potentially pulling in the United States and setting the stage for a bitter regional conflict.

Colin P. Clarke is the director of research at the Soufan Group, an intelligence and security consulting firm based in New York City.

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: letters@nytimes.com.

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.