MAALE ADUMIM, West Bank (AP) - A Palestinian gunman opened fire in an Israeli settlement east of Jerusalem on Tuesday, wounding six people before being shot and killed, Israeli police said.

The shooting at a mall in the sprawling Jewish settlement of Maale Adumim, in the occupied West Bank, was the latest in the most violent stretch of the Israeli-Palestinian conflict in the territory in nearly two decades.

Later on Tuesday, the Israeli military said a soldier shot a Palestinian who allegedly tried to carry out a stabbing attack in the southern West Bank, near the city of Hebron. His condition was unclear.

In the hilly settlement of Maale Adumim on the eastern outskirts of Jerusalem, an off-duty police officer heard gunshots and rushed over to where an assailant had shot Israelis on the street near a shopping mall after shooting and wounding diners outside a burger joint. When confronted, the assailant turned his gun on the officer and started to shoot, police said. The officer opened fire, killing the Palestinian, who was dressed as a security guard in a neon vest.

The Islamic militant groups Hamas and Palestinian Islamic Jihad praised the attack as “heroic” but stopped short of claiming responsibility.

In an audio clip purportedly recorded by the assailant and shared on social media, he vows to “die for the sake of Allah” and asks that his attack “not be claimed by any political faction.”

“This operation is a natural response to the storming of the sacred Al-Aqsa Mosque,” Islamic Jihad spokesman Tariq Salami said, referring to a visit to the sensitive Jerusalem holy site by hard-line Israeli National Security Minister Itamar Ben-Gvir and thousands of other religious Jews last week. The contested compound has long been a flashpoint for violence between Israelis and Palestinians.

The Palestinian Health Ministry identified the assailant as 20-year-old Muhannad al-Mazraa from Azariya, a West Bank town just east of Jerusalem.

The attacker wounded at least six people, Israel's rescue service said, including a 41-year-old man who was seriously hurt. The rest of the men, ranging in age from 14 to 37years old, were fully conscious and in moderate condition, it added.

“Some of the victims escaped and hid in shops in the mall,” said Israeli medic Miryam Sharvit. “A victim was in a restaurant with his wife and 5-year-old daughter when they suddenly heard gunfire.”

Fighting between Israel and the Palestinians in the West Bank intensified early last year when Israel launched near-nightly raids into Palestinian areas in the West Bank in response to a spate of Palestinian attacks against Israelis.

The violence has spiked this year, with more than 150 Palestinians killed by Israeli fire since the start of 2023 in the West Bank and east Jerusalem, according to a tally by The Associated Press.

Israel says most of those killed have been militants, but stone-throwing youths protesting the raids and others not involved in the confrontations have also been killed.

At least 26 people have been killed in Palestinian attacks against Israelis during that time.

Israel captured the West Bank in the 1967 Mideast war, along with the Gaza Strip and east Jerusalem. Palestinians seek those territories for their hoped-for independent state.