Three Israelis have been shot dead by a Palestinian at the entrance to the Jewish settlement of Har Adar in the occupied West Bank, Israeli police say.
The gunman, a 37-year-old from a nearby village, was also shot and died later.
Israeli Prime Minister Benjamin Netanyahu blamed the attack on Palestinian incitement.
It came as Donald Trump’s Middle East envoy Jason Greenblatt arrived in Jerusalem to try to revive Israel-Palestinian peace talks.
Police say the gunman, identified in Israeli media as Nimer Jamal, struck after he raised suspicions of security personnel at a rear gate at Har Adar.
He shot his victims – two security guards and a border policeman – at close-range and seriously wounded another person, before being shot by security forces.
The gunman was a father-of-four who had an Israeli permit to work in Jewish settlements along the boundary of the West Bank, Israel’s internal security agency said.
He came from the village of Beit Surik, about a mile east of Har Adar.
The area is about 18km (11 miles) north-west of Jerusalem.
No group has taken responsibility for the attack, although Gaza-based Palestinian militant organisations Hamas and Islamic Jihad welcomed it.
The head of the Information Office of Fatah, the political faction of Palestinian President Mahmoud Abbas, said Israel bore responsibility for the attack, because of its “continuous aggression” against the Palestinians.
Israeli Prime Minister Netanyahu said the attacker’s home would be demolished and relatives’ work permits revoked. He called on Mr Abbas to condemn the attack unequivocally.
Tuesday’s attack is the latest in a wave of stabbings, shootings and car-rammings of Israelis predominantly by Palestinians or Israeli Arabs since late 2015.
Since then, some 50 Israelis and five foreign nationals have been killed in such attacks in Israel and the Occupied Territories.
Around 300 Palestinians – most of them assailants, Israel says – have also been killed in that period, according to AFP news agency. Others have been killed in clashes with Israeli troops.
Israel says Palestinian incitement has fuelled the attacks. The Palestinian leadership has blamed frustration rooted in decades of Israeli occupation.