BEIRUT—On the day Syrian anti-aircraft missiles downed an American-made Israeli F-16 fighter jet, a banner boasting of the feat in both Arabic and Hebrew script went up in a village in southern Lebanon. To the northeast, loyalists of Bashar al-Assad, the president of Syria, distributed sweets to passersby on the streets of Damascus while the owner of a men’s clothing store put up a sign in his window reading: “Discount on the occasion of the downing of the enemy’s jet!” In a television studio in southern Beirut, the media arm of Hezbollah, the Lebanese militant group and stalwart ally of Iran and the Assad regime, broadcast live commentary declaring the incident a major turning point. “We are witnessing a strategic transformation on the ground,” declared one of the pundits. “From now on, we can’t speak about [the] Syrian army, Hezbollah, Yemeni army, Iraqi army, and Iranian army. We must speak about one resistance axis operating in all theaters.”

With the bellicose rhetoric and heightening tensions, the incident seemed certain to finally draw Israel into an all-out military confrontation with Syria—one that could spill into Israel itself and across Jordan and Lebanon. Iran’s vaunted axis would finally have its “total war” against the “Zionist enemy” and its “master” America and the “Jewish monarchs” of Saudi Arabia. But war with Israel is the last thing Iran and Hezbollah want. In reality, Tehran is now threatening to mobilize its entire array of proxies to get what it wants in Syria and throughout the region. So far, it seems to be daring the world to test it.

Given the number of players and range of agendas clashing inside Syria and beyond, Iran is playing a most dangerous game. Israeli forces shot down an Iranian drone that briefly crossed into their airspace at dawn on Saturday and then hit a command post deep inside Syria, triggering the response that caused the F-16 jet to crash near Israel’s northern city of Haifa. The crash was then followed by waves of retaliatory Israeli airstrikes against Syrian regime, Iranian, and Hezbollah targets inside Syria. Hours later on that same day, Turkey lost a helicopter and two pilots in its ongoing campaign in northern Syria to crush a U.S.-backed Kurdish militia. A week before, a Russian jet was shot down in northwestern Syria, an area policed by Turkey and dominated by militant Islamist rebels. And just yesterday, The New York Times reported that at least four Russian nationals and perhaps dozens more were among those killed in a recent U.S. airstrike on pro-Assad fighters attempting to move into Kurdish-controlled territory in eastern Syria.

After the downing of the F-16, Iran and Hezbollah signaled that they did not want escalation. They are, however, bent on using the recent events to blunt further moves by Israel against the military presence they have built up inside Syria to protect the Assad regime. Iran wants a negotiated end to Syria’s civil war that rehabilitates Assad as the sole legitimate head of a unified Syrian state, and recognizes its own presence and influence from Beirut to Baghdad via Damascus.

This quest became more urgent for Iran late last year, as Israel stepped up attacks on Hezbollah and Iranian targets inside Syria and as the battle against the Islamic State wound down. As the group fell, Tehran saw Syria devolve into cantons beyond the control of their man in Damascus. Washington, which has no official contact with Assad, said it would not withdraw its nearly 2,000 soldiers from an oil-rich swath of northeast Syria along the border with Iraq until every last ISIS fighter is defeated and a final political settlement is reached.

“Iran is now mainly preoccupied with Syria’s future and cementing its share of influence and power in the Arab world. The enmity with Israel is simply the card it will use in negotiations to achieve its goals,” Ali al-Amine, a Beirut-based expert on Shiite affairs who runs a news site critical of Hezbollah and Iran’s regional meddling, told me.

Ties between Tehran and Damascus date back to 1979, when Iran’s Shiite clerics forged an alliance with the Assad family shortly after seizing power from the U.S.-backed Shah. Both are minorities surrounded by majorities. Iran’s Shiite leaders faced the hostile Sunni-led monarchy in Saudi Arabia and a Sunni-dominated Arab world, while the Assads, members of the Shiite-linked Alawite minority, ruled Sunni-majority Syria with an iron fist. Assad’s father and regime founder Hafez was the only Arab leader to side with Iran in its long and bloody war against Saudi-backed Saddam Hussein in the 1980s. And it was largely Iran and the group that would later become Hezbollah that helped Hafez regain his leverage in Lebanon’s civil war after Israel invaded the country in 1982. Iran and Hezbollah came to the rescue again in 2005 after Bashar, who inherited power from his father in 2000, was pushed out of Lebanon and accused of ordering the assassination of Lebanese political and business leader Rafik al-Hariri.

When the Assad family cracked down on protestors in 2011 during the Arab spring, there was no question where Iran and Hezbollah stood. Once the repression morphed into a brutal civil war, and then into a proxy war among regional and international powers, Iran’s money, manpower, and military planning kept the battered Syrian forces afloat. Tens of thousands of pro-Iran Shiite militiamen dominated by Hezbollah and fighters from Iraq and elsewhere led the fight to take back cities like Homs, areas around Damascus, and, eventually, the northern city of Aleppo. While living and reporting inside Syria between 2012 and 2014, I sometimes saw these militiamen camouflage themselves as Syrian soldiers.

In the end, Iran and Hezbollah embedded themselves into the Syrian state. That allowed them to begin expanding a long-term economic, military, political, and even religious and cultural presence. It was precisely this outcome, along with Hezbollah’s acquisition of advanced missiles and weapons, that Israel tried to thwart when it began a campaign of escalating strikes inside Syria in January 2013.

Exactly five years later, with the United States focused narrowly on defeating ISIS in Syria, Israel finds itself turning to Russia. Vladimir Putin is eager to maintain his position as the chief power broker in the conflict, following his military intervention at the behest of Assad and Iran in 2015. The general perception is that Putin controls Assad because he owes his survival to Russia’s military and political support. While in awe of Putin, the Syrian president knows he is a ruthless, unsentimental leader, leveraging his foray into Syria for a larger power play. As several of Assad’s former and current associates have told me, he knows that only Iran and Hezbollah have a deep commitment to him, his family, and his sect. He’s also well aware of the fact that, in the eyes of the world, he often appears to be nothing more than a pawn in their broader regional game.

There are already signs of Assad’s resistance to Putin’s agenda in Syria. On Tuesday, the Syrian foreign ministry announced that it saw no role for the United Nations in overseeing the drafting of a new constitution for the country, even though the Russians have gone out of their way to court Staffan de Mistura, the body’s Syria envoy, and make sure he is involved in this process to lend it legitimacy. De Mistura attended the Syria conference in the Black Sea resort of Sochi last month that was boycotted by most of the opposition. And while Russia has been skeptical of Assad’s determination to regain “every inch” of Syria, it has backed him and the Iranian-led militias in this year’s offensives to retake rebel-held Idlib province in the north and the Eastern Ghouta near Damascus. So far, close to 900 civilians have already been killed in these campaigns, according to the Violations Documentation Center.

With their position entrenched in Syria and their influence in Lebanon, Iraq, and Yemen secure, Iran and Hezbollah and their Shiite allies believe they have built a formidable, unified, border-spanning front. How they choose to exert their power could dictate the future for this region. In Lebanon, Iran and its allies have weighed in on a dispute with Israel over oil drilling rights in the Mediterranean Sea. Hezbollah’s political wing is a cornerstone of the Lebanese government, a reality U.S. Secretary of State Rex Tillerson acknowledged in Jordan on Wednesday ahead of a trip to Lebanon, despite his boss’s hostile rhetoric toward the group and its patron Iran.

More ominously, in Iraq, Qais al-Khazali, the commander of one of Iran’s top Shiite militias, threatened attacks this week on U.S. troops unless they left the country following the defeat of ISIS. Two months ago, Khazali was with Hezbollah commanders at the Lebanese-Israeli border. “The Islamic resistance is fully ready to heed the call of Islam and pave the way for the state of divine justice, the state of Imam Mehdi,” he said.