Four people were killed in a shootout at the entrance to a Jewish settlement in the occupied West Bank on Tuesday.
Israeli police said a Palestinian man was shot dead after he opened fire killing three security personnel at the Har Adar settlement near Jerusalem. Another person was seriously wounded.
The gunman arrived at the rear gate to the settlement with Palestinian labourers, "pulled out a weapon and opened fire at the force at the site," police said.
The shooter was a 37-year-old man from Beit Surik, a Palestinian village near Har Adar, who carried a work permit for the settlement.
The settlement is close to several Palestinian villages.
Shay Retter, the head of Har Adar's security committee, said between 100 and 150 Palestinian labourers typically enter the community each day for work.
The attack, which came as US envoy Jason Greenblatt was due in Jerusalem for talks on relaunching the moribund Middle East peace process.
Har Adar, a well-to-do settlement north-west of Jerusalem, is located high in the hills close to the Green Line that separates the occupied West Bank from Israel.
The windows of the guard booth at its northern entrance, where Palestinian day labourers are required to undergo security checks, had been shattered by the shooting.
Many Palestinians are forced to take jobs in the settlements, which are considered illegal under international law, because of the desperate economic situation blamed on the Israeli occupation.
Israeli police spokesman Micky Rosenfeld said the gunman had concealed himself among other Palestinian workers.
"He hesitated and then all of a sudden, several metres before a security check, pulled out a nine millimetre weapon and opened fire directly at the two private security guards, who were shot and killed directly at the scene," Mr Rosenfeld said.
"He also opened fire to a border police officer that was also located here.”
He said there would have to be a security review of work permits for the thousands of Palestinians who work in Israel and the settlements.
Israel's Shin Bet internal security service identified the gunman as Nimer Aljamal, a father of four with no previous "security background".
Munir Al Jaghoub, an official from the ruling Palestinian party Fatah, said: “Israel alone is responsible for Palestinian reactions to the crimes of the occupation, and if it continues its aggressions against the Palestinian people.”
He added that Israel “must be well aware of the consequences of its continued push towards violence, the policy of house demolitions, the forced displacement of Jerusalemites, and the successive incursions of settlers to the Al Aqsa Mosque compound.”
Mr Netanyahu called on the Palestinian president to condemn the attack.
Palestinian Islamist movement Hamas, which rules Gaza, hailed the attack as "revenge for the crime of occupation against our people."
The UN envoy to the Middle East Nickolay Mladenov condemned both the attack and the Hmas reaction.
"It is deplorable that Hamas and others continue to glorify such attacks, which undermine the possibility of a peaceful future for both Palestinians and Israelis," he said.
Many Palestinians see those killed carrying out attacks against Israeli occupation forces as martyrs.
The shooting comes nearly two years after the start of a wave of unrest. The violence had greatly subsided in recent months.
Since October 2015, the violence had killed at least 295 Palestinians and 50 Israelis.
Israeli authorities say that most of the Palestinians killed were carrying out knife attacks, but human rights groups accuse Israel of excessive force and carrying out extrajudicial executions to deal with the incidents.
The violence had greatly subsided in recent months but Shin Bet chief Nadav Argaman warned in a briefing to the cabinet earlier this month that the risk of new attacks was ever present.
West Bank settlements and the rate at which they have been built under Mr Netanyahu’s government are regarded as a major sticking point in peace talks and make the prospects of a Palestinian state increasingly unlikely.
The UN envoy told the Security Council on Monday that Israel continues to build settlements "at a high rate," in defiance of Security Council demands for an end to their expansion.
The international community regards all Jewish settlements in the occupied West Bank, including Israeli-annexed east Jerusalem, as illegal.
* With reporting from Agence France-Presse and Associated Press