JERUSALEM (AP) -- Israel carried out an airstrike in Syria on a building used by Islamic State militants to attack Israeli forces, the military said Monday.

The overnight air strike targeted an abandoned United Nations building that Israel said was used as a base by the militants. There were no immediate reports of injuries.

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 with limited reprisals on Syrian positions in response to the errant fire.

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

No Israeli troops were hurt, but it was a rare attempt by IS-affiliated militants to ambush Israeli forces.