Two Hamas members carried out the attack outside Eli, a settlement in the northern West Bank, before being shot dead themselves.
Two Palestinian gunmen shot and killed four Israeli civilians on Tuesday afternoon outside a Jewish settlement in the Israeli-occupied West Bank, the Israeli military said, in the deadliest attack on Israelis since January.
The shootings occurred at a restaurant and gas station next to the settlement of Eli, about 25 miles north of Jerusalem, video showed. An Israeli civilian shot and killed one of the assailants, a Palestinian from a nearby Arab town, and a second attacker was later shot in his getaway vehicle after a manhunt, security officials said.
Hamas, the Islamist militia and political movement that controls the Gaza Strip, said that the attackers had been members of its armed wing and described the violence as a response to recent Israeli airstrikes on Gaza, police raids on a mosque in Jerusalem and military incursions in the northern West Bank.
Hamas has often avoided direct acknowledgment recently of any involvement in West Bank violence. Its decision to claim responsibility this time raised the possibility of Israeli reprisals on Hamas leaders and infrastructure in both Gaza and the West Bank.
The Israeli prime minister, Benjamin Netanyahu, said in a statement: “Our forces are now working on the ground in order to settle accounts with the murderers. In recent months, we have already proven that we do settle accounts with all of the murderers, without exception. Those who have attacked us are either in the grave or in prison, and so it will be here.”
The attack also renewed calls from within Mr. Netanyahu’s governing coalition — the most nationalist and socially conservative in Israeli history — for even more forceful action in the territory.
Israeli forces already conduct daily raids within Palestinian towns in the West Bank, in what experts say is the most sustained military operation there since the second intifada, or Palestinian uprising, in the 2000s. One such raid on Monday prompted an unusually prolonged gun battle between Israeli soldiers and Palestinian militants in another part of the northern West Bank, killing six Palestinians and causing rare damage to Israeli military vehicles.
That brought the death toll for Palestinians this year to more than 160. Most of them were killed in the West Bank during Israeli military raids — one of the highest death rates in the last decade and a half.
But some right-wing lawmakers in Israel say the army needs to do even more to counter a wave of Arab violence that has killed at least 29 Israelis in 2023, most of them during attacks by Palestinians.
Israel captured the West Bank from Jordan during the 1967 Arab-Israeli war. It has occupied the territory ever since, constructing hundreds of Jewish settlements that most countries say are illegal under international law but that settlers consider a legitimate reclamation of land that was ruled by Jews in antiquity.
The vanishing likelihood of a Palestinian state in the West Bank, the entrenchment of Israel’s control on territory and a weakening of the mainstream Palestinian leadership there have all contributed to a rise in Palestinian militancy. Much of it is driven by a new generation of small armed groups frustrated with the status quo.
The Israeli government announced this past week that it would make it faster and easier to approve settlement construction in the West Bank, and is expected to advance plans next week for more than 4,000 new housing units in settlements in the territory.
The shooting on Tuesday happened on the main highway in the West Bank, around a gas station mainly used by Israeli settlers but easily accessible to Palestinians. The site was previously attacked in 2015.
The Israeli military said in a statement that the gunmen first shot three civilians at a restaurant near the entrance to Eli, before killing another person at the nearby gas station and injuring several others. One of the attackers was then shot by a passer-by, and the second drove roughly 25 miles north before being intercepted and shot by a group of Israeli security officers.
Eli was established in 1984 on hundreds of acres of land that was claimed by nearby Palestinian villages but that Israeli officials said had no private owners. It is now home to roughly 4,600 Israelis, and houses an academy that prepares religious Israelis for military service and whose founders are known for their ultraconservative views.
Hiba Yazbek contributed reporting from Jerusalem, and Iyad Abuheweila from Gaza City.