Hamas claimed responsibility for a shooting attack in Jerusalem that killed three people on Thursday, shortly after the extension of a truce between Israel and the Islamist group that rules the Gaza Strip.
Police said the two gunmen who carried out the attack were from annexed east Jerusalem and were shot dead at the scene, near a bus stop on the western side of the city, where there are no checkpoints controlling entry.
"Two terrorists arrived in a car, one of them armed with an M-16 and the other with a pistol," and opened fire, Jerusalem police chief Doron Torgeman told reporters at the scene.
The two gunmen were shot dead "after the attack by two off-duty IDF (Israeli army) soldiers and another civilian who fired at them", police said in a statement.
"A police search of the terrorists' car revealed ammunition and weaponry," it added.
A police spokesman identified those killed as a 73-year-old rabbi, Elimelech Waserman, along with Hana Ifergan, 67, and Livia Dikman, 24.
In a statement issued hours later claiming responsibility, Hamas called the attack "a natural response to the unprecedented crimes of the occupier in the Gaza Strip and against children in Jenin", in the Israeli-occupied West Bank.
Israeli President Isaac Herzog, at a meeting with visiting US Secretary of State Antony Blinken, said the shooting was an example of the "endless war that we are fighting against terror organisations, especially Hamas".
Blinken similarly called it another reminder of the threat "Israelis face every single day".
Hamas identified the attackers as brothers Murad Nemr, 38, and Ibrahim Nemr, 30, saying they were members of its armed wing based in east Jerusalem.
Police said the attackers had been jailed by Israel in the past.
Footage circulating on social media and broadcast on Israeli television showed two men emerging from a white car and opening fire on people waiting for a bus, before security personnel and bystanders intervene and return fire.
AFP was unable to immediately verify the footage.
In a statement posted on Telegram, Prime Minister Benjamin Netanyahu said the swift action of the off-duty soldiers and civilians had "prevented an even more serious attack".
"My government will continue to expand the distribution of weapons to citizens," he added.
Meanwhile, two Israeli soldiers were slightly injured in a ramming attack at a checkpoint in the West Bank, the army said, adding "soldiers at the scene shot and neutralised the assailant".
"The soldiers were evacuated to a hospital to receive medical treatment," it said in a statement, noting forces were "searching the area for additional suspects".
Violence has surged in the West Bank since the Hamas attacks on southern Israel on October 7, and Israel's retaliatory assault on the group in the Gaza Strip.
Two weeks ago an Israeli soldier died after being shot in an attack on a checkpoint at the entrance to a tunnel linking the Israeli-occupied West Bank with Jerusalem.
Another five Israeli security personnel were also wounded, with Israeli police shooting dead all three assailants.
That attack was also claimed by the armed wing of Hamas, the Ezzedine al-Qassam Brigades.