The attack on Thursday occurred 10 days after a gun attack in Bnei Brak, a city just east of Tel Aviv, in which a Palestinian attacker killed three Israelis and two Ukrainians.
That incident came just two days after a gun attack in which two Arab citizens of Israel, armed with heavy automatic weapons, fatally shot two police officers in Hadera, a coastal city in northern Israel.
The string of deadly attacks began March 22, when an assailant stabbed three people and rammed another with his car in a city in southern Israel, killing all four. Before the March 22 assault, there had also been two other nonlethal stabbing attacks in the space of a week in Jerusalem.
Most attacks in recent years have been carried out with knives, so the surge in the use of firearms has been of particular concern to security officials, because it implies an unusual level of forethought and resources.
At the time of the attack, the Israeli prime minister, Naftali Bennett, was visiting the Israeli Army headquarters in a nearby district of Tel Aviv, and was briefed there about the assault.
The motivations of the recent attackers have varied. Three of the attackers have been Arab citizens of Israel who were believed to support the Islamic State, the extremist group that is not part of the Palestinian nationalist movement. The shooter in Bnei Brak was a Palestinian from the occupied West Bank who had previously served 30 months in an Israeli jail for conspiracy to commit manslaughter and for throwing objects at vehicles.