Israel will not remove metal detectors whose installation outside a major Jerusalem mosque has triggered the bloodiest confrontations with the Palestinians in years, but could eventually reduce their use.

With Israeli generals warning the violence may spiral, Prime Minister Benjamin Netanyahu is considering alternatives to the walk-through gates placed at entrances to al Aqsa mosque compound after two policemen were shot dead there on July 14.

But the rightist Netanyahu government is wary of being seen to capitulate to Palestinian pressure at the site, which Jews revere as the vestige of their two ancient temples and which was among East Jerusalem areas Israel captured in a 1967 war and annexed as its capital in a move not recognised internationally.

"They (metal detectors) will remain. The murderers will never tell us how to search the murderers," Tzachi Hanegbi, Israeli minister for regional development and a senior member of the ruling Likud party, told Israel's Army Radio on Sunday.

"If they (Palestinians) do not want to enter the mosque, then let them not enter the mosque."

Incensed at what they perceive as a violation of delicate decades-old access arrangements at Islam's third-holiest site, many Palestinians have refused to go through the metal detectors, holding street prayers and often violent protests.

Israeli security forces shot three demonstrators dead on Friday, Palestinian medics said. Police said they were investigating the charge.

A fourth Jerusalem-area Palestinian was killed on Saturday when an explosive device he was building went off prematurely, the Israeli military said. Palestinian medics said he died of shrapnel wounds to the chest and abdomen.

In a sign unrest was spreading, a Palestinian stabbed three Jewish settlers in the occupied West Bank on Friday after vowing on Facebook to take up his knife and heed "al Aqsa's call".

On Sunday, a rocket was launched into Israel from the Gaza Strip but hit an open area, causing no damage, Israel's military said.

The incidents "attest to the combustability of the current period," military chief Lieutenant-General Gadi Eizenkot said in a speech to new recruits. Gilad Erdan, Israel's public security minister, also warned of potential "large-scale volatility".

Interviewed on Army Radio, Erdan said Israel may do away with metal-detector checks for all Muslims entering the al Aqsa compounds under alternative arrangements under review.

These could include reinforcing Israeli police at the entrances and introducing CCTV cameras with facial-recognition technologies.

"There are, after all, many worshippers whom the police knows, regulars, and very elderly people and so on, and it recommended that we avoid putting all of these through metal detectors," Erdan told Army Radio, suggesting that only potential trouble-makers would be subjected to extra screening.

Any such substitute arrangement was not ready, he added.

The Muslim authorities that oversee al Aqsa said they would continue to oppose any new Israeli-imposed measures, however.

Palestinian President Mahmoud Abbas on Friday ordered the suspension of all official contact with Israel.