JERUSALEM -- Israeli aircraft struck a machine gun-mounted vehicle inside Syria Sunday, killing four militants affiliated with the Islamic State of Iraq and Syria (ISIS) inside after they had opened fire on a military patrol on the Israeli side of the Golan Heights, the Israeli military said.

Israel has been largely unaffected by the Syrian civil war raging next door, suffering only sporadic incidents of spillover fire over the frontier that Israel has generally dismissed as tactical errors of the Assad regime. Israel has responded to these cases lightly, with limited reprisals on Syrian positions in response to the errant fire.

But Sunday’s event, in the southern part of the Golan Heights, appears to be a rare case of an intentional shooting ambush by Islamic militants targeting Israeli troops.

Get Breaking News Delivered to Your Inbox

Lt. Col. Peter Lerner said the Israeli patrol came under machine gun and mortar fire early Sunday. They returned fire toward Syria before an Israeli aircraft engaged, striking the vehicle in question and killing its passengers. He said all were suspected militants from an IS offshoot that controls the area. No Israeli troops were harmed.

Prime Minister Benjamin Netanyahu commended the troops for thwarting the attack.

“We are well prepared on our northern border and will not allow Islamic State elements or any other hostile elements to use the war in Syria to establish themselves close to our borders,” he said at his weekly Cabinet meeting.

Though Israel has generally stayed on the sidelines of the fighting, fearing being sucked into a clash between forces that are all hostile to it, it is widely believed to have carried out airstrikes on arms shipments said to be destined for the Lebanese militant group Hezbollah, a close ally of the Syrian government.

Israel captured the Golan Heights from Syria in the 1967 Mideast War and the two countries remain enemies.

Amos Yadlin, a former military intelligence chief and current director of the Institute for National Security Studies, an independent think-tank, said it was too early to determine whether the attack marked a shift in ISIS policy or just a local initiative by some of its fighters.

He said ISIS has been very careful to avoid attacking Israel to this point since it has been engaged with so many other adversaries. But with its back against the wall in Syria and Iraq, he said they may be looking for a propaganda victory by targeting Israel. He said they were capable of far worse than a routine ambush.

“We will have to watch closely in the future to see if this is a change of policy,” Yadlin said. “I don’t think this is a planned strategy.”