In the last week alone, an Israeli airstrike has killed a Hezbollah commander in Lebanon, Hezbollah struck a sensitive Israeli base with rockets and Israel killed a senior Hamas militant with an airstrike in Beirut.

Each strike and counterstrike increases the risk of the catastrophic war in Gaza spilling across the region.

In the decades-old standoff pitting the U.S. and Israel against Iran and allied militant groups, there are fears that any party could trigger a wider war if only to avoid appearing weak. A U.S. airstrike killed an Iran-backed militia leader in Baghdad last week, and the U.S. Navy recently traded fire with Iran-aligned Houthi rebels in the Red Sea.

The divisions within each camp add another layer of volatility. Hamas might have hoped its Oct. 7 rampage across southern Israel that triggered the war in Gaza would drag its allies into a wider conflict. Israelis increasingly talk about the need to change the equation in Lebanon even as Washington aims to contain the conflict.

As the intertwined chess games grow more complicated, the potential for miscalculation rises.

GAZA IS GROUND ZERO

Hamas says its Oct. 7 attack was a purely Palestinian response to decades of Israeli domination. There is no evidence that Iran, Hezbollah or other allied groups played a direct role or knew about it beforehand.

But when Israel responded by launching one of the 21st century's most devastating military campaigns in Gaza, a besieged enclave home to 2.3 million Palestinians, the so-called Axis of Resistance -- Iran and the militant groups it supports across the region -- faced pressure to respond.

The Palestinian cause has deep resonance across the region, and leaving Hamas alone to face Israel's fury would have risked unravelling a military alliance that Iran has been building up since the 1979 Islamic Revolution put it on a collision course with the West.

"They don't want war, but at the same time they don't want to let the Israelis keep striking without retaliation," said Qassim Qassir, a Lebanese expert on Hezbollah.

"Something big has to happen, without going to war, so that the Israelis and Americans are convinced that there is no way forward," he said.

HEZBOLLAH THREADS THE NEEDLE

Of all Iran's regional proxies, Hezbollah faces the biggest dilemma.

If it tolerates Israeli attacks, like the strike in Beirut that killed Hamas' deputy political leader, it risks appearing to be a weak or unreliable ally. But if it triggers a full war, Israel has threatened to wreak major destruction on Lebanon, which is already mired in a severe economic crisis. Even Hezbollah's supporters may see that as too heavy a price to pay for a Palestinian ally.

Hezbollah has carried out strikes along the border nearly every day since the war in Gaza broke out, with the apparent aim of tying down some Israeli troops. Israel has returned fire, but each side appears to be calibrating its actions to limit the intensity.

A Hezbollah barrage of at least 40 rockets fired at an Israeli military base on Saturday sent a message without starting a war, though it may have triggered Monday's strike.

Would 80 rockets have been a step too far? What if someone had been killed? How many casualties would warrant a full-blown offensive? The grim math provides no clear answers.

And experts say it might not be a single strike that does it.

Israel is determined to see tens of thousands of its citizens return to communities near the border with Lebanon that were evacuated under Hezbollah fire nearly three months ago. After Oct. 7, it may no longer be able to tolerate an armed Hezbollah presence on the other side of the frontier.

Israeli leaders have repeatedly threatened to use military force if Hezbollah doesn't respect a 2006 U.N. ceasefire that ordered the militant group to withdraw from the border.

"Neither side wants a war, but the two sides believe it is inevitable," said Yoel Guzansky, a senior researcher at Israel's Institute for National Security Studies at Tel Aviv University. "Everybody in Israel thinks it's just a matter of time until we need to change the reality" so that people can return to their homes, he said.

U.S. DETERRENCE ONLY GOES SO FAR

The U.S. positioned two aircraft carrier strike groups in the region in October. One is returning home but is being replaced by other warships. The deployments sent an unmistakable warning to Iran and its allies against widening the conflict, but not all seem to have received the message.

Iran-backed militant groups in Syria and Iraq have launched dozens of rocket attacks on U.S. bases. The Iran-backed Houthi rebels in Yemen have attacked international shipping in the Red Sea, with potential consequences for the world economy. Iran says its allies act on their own and not on orders from Tehran.

Washington has struggled to put together a multinational security force to protect Red Sea shipping. But it appears hesitant to attack the Houthis on land when they appear close to reaching a peace deal with Saudi Arabia after years of war.

Meanwhile, Israeli officials have said the window for its allies to get both Hezbollah and the Houthis to stand down is closing.

HOW DOES THIS END?

The regional tensions are likely to remain high as long as Israel keeps up its offensive in Gaza, which it says is aimed at crushing Hamas. Many wonder if that's possible, given the group's deep roots in Palestinian society, and Israel's own leaders say it will take many more months.

The U.S., which has provided crucial military and diplomatic support for Israel's offensive, is widely seen as the only power capable of ending it. Iran's allies seem to believe Washington will step in if its own costs get too high -- hence the attacks on U.S. bases and international shipping.

U.S. Secretary of State Antony Blinken, European Union foreign policy chief Josep Borrell and German Foreign Minister Annalena Baerbock are all back in the region this week, with the aim of trying to contain the violence through diplomacy.

But the most important messages will likely be sent by rocket.

"The Americans do not want an open war with Iran, and the Iranians do not want an open war with the United States," said Ali Hamadeh, an analyst who writes for Lebanon's An-Nahar newspaper. "Therefore, there are negotiations by fire."

------

Associated Press writers Bassem Mroue in Beirut and Julia Frankel in Jerusalem contributed to this report.