A Palestinian teenager has been shot and injured by an Israeli off-duty security guard, after he entered a supermarket in the occupied West Bank and stabbed two Israeli civilians, police said.

Police spokeswoman Luba Samri said a 16-year-old Palestinian entered the supermarket in the settlement of Maaleh Adumim, east of Jerusalem, and stabbed two Israeli shoppers.

Samri said the two shoppers, in their 50s, were moderately wounded and taken to a hospital in Jerusalem.

Police said the alleged attacker, from the village of al-Azariya east of Jerusalem, was also moderately wounded. Maaleh Adumim is around 10km from al-Azariya.

The armed Israeli who shot the teenager was an off-duty security officer from Prime Minister Benjamin Netanyahu's office, the prime minister said.

"On the way here I talked to the guard who prevented a lethal attack at Mishor Adumim," he said during a televised address in Tel Aviv.

"I know him, he is a guard at the prime minister's office," Netanyahu said. "I told him we are all proud of him."

The security guard shot the attacker in the legs and police later arrested him, Samri said.

Palestinians arrested

David Assaraf, the spokesman for Israeli police in the West Bank, told the AFP news agency that officers were called to the scene after gunfire was reported, finding the two Israelis and the alleged attacker lying wounded on the ground.

"Two more [Palestinians] were arrested and are under investigation," he said.

Police said they were caught trying to flee the scene but provided no further details about how they may have been involved.

Many Palestinians work in the settlement's industrial zone and the Rami Levi supermarket where the attack happened is frequented by Palestinians and Israelis.

Tensions in Jerusalem and the West Bank have been high since June, when Palestinians kidnapped and killed three Israeli settlers in the West Bank. Israelis retaliated by abducting and burning alive a Palestinian teenager in East Jerusalem.

The kidnappings set off a series of events that led to the 50-day Gaza war, which left more than 2,100 Palestinians and 71 Israelis dead.

Revenge attacks from both sides have been happening since summer.

The issue of access to the Al-Aqsa mosque compound, holy to both Muslims and Jews, has also added to the tensions, as has anger over illegal settlements on Palestinian land.

Source: Al Jazeera and agencies