Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

TEL AVIV, Israel — A Palestinian attacker opened fire at the entrance to an upscale Jewish settlement in the West Bank, killing three Israeli men and critically wounding a fourth, authorities said.

The suspect was also fatally shot during the incident at Har Adar, police spokesman Luba Samri said.

"We spoke to him about his issues but nothing we saw would indicate anything would happen like what happened today"

The gunman had passed Israeli military security checks, which review Palestinians’ family connections and criminal records, to receive a permit to work in settlements in the West Bank and Israel itself, police told NBC News.

The 37-year-old suspect blended in with Palestinian day laborers entering the gated community, officials said.

Between 100 and 150 Palestinians have jobs in Har Adar, according to Shay Retter, the head of the settlement's security committee.

Moishe Berdichev, a resident of Har Adar, told Israel's Army Radio that the attacker worked as a cleaner at his house.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I was supposed to pick him up tomorrow at the same checkpoint," he said. "I knew he had personal problems at home after his wife ran away ... We spoke to him about his issues but nothing we saw would indicate anything would happen like what happened today."

Berdichev added: "It is frightening and shocking to know that this person was the one who worked at our house. This is our reality — on one hand coexistence and on the other understanding that these things can happen."

The Israeli Security Agency named the attacker as Nimr Mahmoud Ahmed Jamal, and added that his wife had left him and their four children several weeks ago.

Har Adar is west of Jerusalem and on the seam line between the West Bank and Israel proper. Jewish settlements in the West Bank are a contentious issue because Palestinians see the area, which Israel has occupied since 1967, as integral to a future state.

Israeli border police stand at the site of an attack at the entrance to the West Bank settlement of Har Adar on Tuesday. MENAHEM KAHANA / AFP - Getty Images

The unemployment rate in the West Bank is high and work on the settlements provides vital income to thousands of Palestinians laborers.

Since September 2015, Palestinians have killed 48 Israelis, two visiting Americans and a British tourist in stabbings, shooting and car-ramming attacks.

During that same time, Israeli forces have killed more than 255 Palestinians; Israel says most of them were attackers, others died in clashes with Israeli forces. Most of the attacks have been stabbings against security forces, primarily in the West Bank.

Israel's Defense Minister Avigdor Lieberman accused the Palestinian Authority of inciting the "murder of Jews." He called on the world community to "demand that the Palestinian Authority stop incitement and fanning terror."

Related: Can Trump's Former Lawyer Bring Peace to the Middle East?

The attack comes as U.S. Special Representative for International Negotiations Jason Greenblatt is scheduled to arrive in Israel for meetings with Prime Minister Benjamin Netanyahu and Palestinian Authority President Mahmoud Abbas in hopes of reviving peace talks.

Deputy Foreign Minister Tzipi Hotovely called the incident a "welcome message that the Palestinians prepared for American emissary Jason Greenblatt."

She added: "American efforts must focus first on stopping the murderous Palestinian terror, before anything else."