Israel has long been at war with Palestinian militants but recent deadly attacks claimed or inspired by the Islamic State group have raised fears of a new security threat.
The Jewish state has battled Gaza's Hamas and Islamic Jihad -- but recent violence has been linked to IS, which has radicalized followers online and inspired "lone wolf" attacks in many countries.
Relatively few Palestinians and Israeli Arabs joined the IS before their final territorial defeat in Syria in 2019, with most choosing to stay at home and fight for the Palestinian cause.
Since the demise of the self-declared IS "caliphate", the group has been weakened, taking another blow when US special forces in February killed its then-leader Abu Ibrahim al-Qurashi.
So it was with shock that the mayor of Umm el-Fahm, an Arab town in northern Israel, learned that an IS-claimed attack Sunday had been carried out by two of its residents.
The men, identified by Israeli intelligence as IS operatives, killed two police officers in Hadera, 25 kilometers (15 miles) away.
"Umm el-Fahm is certainly a religious city, but I was surprised to know that IS was present," the mayor, Samir Mahamid, told AFP.
He acknowledged that his town, like many in Israel and the West Bank, is awash with guns, in part due to organized crime, and warned that "tomorrow these weapons will be pointed elsewhere".
When police raided the apartment of one of the men, they found IS material.
A security source told AFP that one of the attackers had been arrested in 2015, while planning to travel to Syria.
At the wake for one of the men, rows of plastic chairs were empty as only a handful of visitors whispered brief condolences before leaving, apparently troubled by the attackers' IS association.
The Hadera shooting was preceded by an attack in southern Israel, where four people were killed in a stabbing and car-ramming rampage by an Israeli Arab previously imprisoned for trying to join IS in Syria.
On Tuesday, a third attack rocked Israel, when a Palestinian man killed five people, including a police officer, with an assault rifle in Bnei Brak, an ultra-Orthodox suburb of Tel Aviv.
Although that attack was not claimed by any group, the seemingly random choice of civilian targets recalled past IS attacks more than those by Palestinian armed factions, which more typically attack Israeli security forces.
The killing spree sparked Israeli army operations in the West Bank and yet more deadly violence, ahead of this weekend's start of Ramadan, which is often a time of heightened tensions.
Israel has declared the highest security alert since the Muslim holy month last year, which kicked off an 11-day bombing war between Hamas and Israel.
Experts say that, while the recent attacks are not evidence of a heightened IS threat, they risk inspiring others.
"There is a copycat element," said Hugh Lovatt, senior policy fellow at the European Council on Foreign Relations.
"As there are an increasing number of attacks, there are an increasing number of Palestinians willing to step up and vent their anger and frustration."
Damien Ferre, the founder of the company Jihad Analytics, warned that IS "still has the ability to strike Israel despite the myth that it's too hard".
Although the group now operates only cells in Syria and Iraq, it has "retained the ability to plan or inspire attacks", said Ferre, whose company studies jihad and cyberspace.
"Israel remains on the radar even if it is not a priority target and this is a small success story for the new caliph," he said, referring to new IS leader Abu Hasan al-Hashemi al-Qurashi.
Yoram Schweitzer, of the International Institute For Counter-Terrorism, estimated that "there are a few dozen ISIS supporters in Israel".
"I wouldn't take this cell to mean that there is an ISIS organization in Israel," he said.
"It was the decision of the local operatives," added Schweitzer, echoing a common assessment that IS operatives tend to act alone, making it harder to anticipate and prevent attacks.
Hamas has in recent years fought IS elements seeking to establish a foothold in Gaza, but it nonetheless welcomed the recent attacks, hailing Tuesday's shooting spree a "heroic operation".
An Israeli security source, speaking on condition of anonymity, said that "Hamas does not want war now, but it wants to keep the conflict with Israel alive".