From time to time, reports emerge that Israel has attacked various targets in Syria. In most cases, Israel does not take responsibility for these attacks. The question I address here is: What is the logic guiding Israel’s actions in Syria, which have been going on for several years, and how far is Israel willing to go?

At the beginning of the vicious internal conflict in Syria, in 2011, Israel decided not to intervene in a war between the Sunni majority—the “rebels,” as they were called—and the ruling regime of Assad and the Alawite minority, which received massive Russian and Iranian aid without which it would not have survived. Israel understood that none of the parties involved bore it any goodwill and that the two sides were behaving in an equally cruel way to each other. There was no moral reason and no political logic to give preference to any of the combatants.

Israel began to use force in Syria when it became apparent that Iran and Hezbollah were utilizing the chaos there to significantly strengthen Hezbollah in Lebanon. Advanced weapons were being supplied to Hezbollah in Syria, and then transferred to Lebanon. These weapons included precise surface-to-surface missiles; some of the most advanced surface-to-air missiles available, sold by Russia to Syria; modern Russian shore-to-sea missiles; and Syrian-made long-range rockets and missiles. This marked the beginning of Israel’s intervention. The Israeli Air Force carried out strikes on supplies of this weaponry throughout Syria, based on precise intelligence. The IDF refrained from striking in Lebanon to avoid pushing Hezbollah into a corner and forcing the organization to retaliate, a scenario which would likely quickly deteriorate into a major conflict.

The IDF also acted when it became clear that Hezbollah and Iran were attempting to establish bases in the Golan Heights, close to the border with Israel. In one notable attack, Israel killed an Iranian general who was touring the frontline and a senior Hezbollah commander. This was the only time that Hezbollah responded with fire—from an ambush in Lebanon, close to the Syrian border—and on this occasion, it was Israel that refrained from any serious response to avoid the prospect of a much larger operation.

Over the last year, since Russia and Iran have managed to stabilize the Assad regime, Iran has decided to progress with the next stage of its strategic plan: transforming Syria into a base of an Iranian war machine against Israel. The Iranians, led by the Revolutionary Guard, are not content with the strong foothold they have established in Lebanon, where Hezbollah has around 120,000 rockets and missiles, many of them highly precise, as well as extremely strong ground forces. Instead, Iran has decided to build its own military structure within Syria, under direct Iranian command, which includes armed UAVs (one of these was flown into Israel around six months ago), long-range missiles, and surface-to-air missiles. This effort is being backed up with intelligence-gathering facilities that are distributed throughout Syria and that have followed Israeli activity carefully.

The Iranians have also moved thousands of Shi’ite militia members from Pakistan, Afghanistan, and Iraq into Syria, many more than the number of foreigners who fought alongside Islamic State in Syria and Iraq (ISIS), and they intend to leave these combat forces stationed in Syria for the foreseeable future. Recently, Iran also strengthened the presence of the Revolutionary Guard in Syria, a high-quality force that is aided by thousands of Hezbollah fighters from Lebanon; these were a significant component of the ground forces that fought alongside the Assad regime and are now part of the spearhead force that the Iranians are creating in Syria. It is not yet clear what the division of responsibility will be between the Shi’ite militias and Hezbollah in possible combat with Israel in Syria or Lebanon, but it is certain that this combination of forces will have a prominent role to play in any future conflict.

In the face of these new Iranian efforts in Syria, Israel is determined to act decisively, and some of the attacks that have been reported were directed against Iran’s fledgling military structure and its Shi’ite militia bases there. Israel will not allow an expansion of the Iranian threat into Syria; if unchecked, such a threat would make it difficult for Israel to defend itself against a combined enemy on the Syrian and Lebanese fronts. Thus, as was not the case in its operations to stop the transfer of arms to Lebanon, Israel is now willing to risk an escalation into all-out war. In short, Israel will do all it can to halt the Iranian efforts to create an Iranian war machine in Syria, 800 miles from Iran and right on Israel’s doorstep.

DF Major General (res.) Yaakov Amidror is a Distinguished Fellow at the Jewish Institute for National Security of America’s Gemunder Center for Defense and Strategy. He is the Anne and Greg Rosshandler Senior Fellow at the Jerusalem Institute for Strategic Studies (JISS). General Amidror was formerly the National Security Advisor to the Prime Minister of Israel, as well as the head of the National Security Council, from 2011-2013.