Israel’s security cabinet has decided to remove metal detectors from the entrance to a holy site in Jerusalem following days of violent clashes.

They are to be replaced by “smart cameras” to monitor worshippers at the al-Aqsa Mosque, which sits on the site known as Temple Mount by Jews and the Haram al-Sharif by Muslims.

The decision was announced at the end of a meeting of Benjamin Netanyahu’s cabinet lasting several hours, following a previous round of discussions on Sunday.

A spokesperson said “sophisticated technology” will be used instead of the metal detectors, following local reports that high resolution cameras capable of detecting hidden objects would be the alternative.

Israeli security forces in the area are to be boosted until the plan is implemented, in response to a Palestinian terror attack that left two Israeli police officers and three Palestinian gunmen dead.

Earlier on Monday, metal railings were set up at the entrance to the shrine that are expected to be part of future security arrangements.

Sheikh Najeh Bakirat, the director of al-Aqsa Mosque, told Al Jazeera work to remove the scanners had started but the move still does not fulfil the demands of protesters as the cameras will remain.

Palestinians pray on the street close to Lion's Gate in the Old City of Jerusalem, closely watched by Israeli security during a mass street Friday prayer on 21 July 2017. (EPA)

The late-night decision came after days of violence and unrest that peaked across Israel and the West Bank following Friday prayers, when three Israelis were stabbed to death in a settlement and four Palestinians killed in protests.

B'Tselem, an Israeli human rights organisation, accused authorities of using “excessive and unjustified force” in a crackdown that saw men under 50 barred from the Old City.

The group said around 120 people were injured by tear gas inhalation, gunshot wounds, stun grenades and other police measures in Jerusalem on Friday.

“The Israel Police treated Palestinian residents as if they were enemy soldiers, rather than as a civilian population for whose wellbeing and security it is responsible,” a spokesperson added.

The crisis began earlier this month when Palestinian gunmen killed two Israel police officers near the al-Aqsa mosque.

In response, Israel installed metal detectors at the site, sparking fresh allegations that it was trying to expand its control under the guise of security, which Benjamin Netanyahu’s government has repeatedly denied.

Israeli authorities said the metal detectors were needed to prevent future attacks, despite reported resistance from the Israeli Defense Forces and Shin Bet intelligence agency.

Palestinians react following tear gas that was shot by Israeli forces after Friday prayer on a street outside Jerusalem's Old City (Reuters/Ammar Awad)

Protests had spread to Muslim-majority countries including Jordan, which is the custodian of the al-Aqsa mosque, with the Arab League warning that Israel was “playing with fire and risking a major crisis with the Arab and Islamic world”.

A guard at the Israeli embassy in Amman shot two Jordanians dead on Sunday night after being attacked with a screwdriver, sparking a fresh crisis between the two countries.

A spokesperson for the Israeli foreign ministry said the attacker had entered a residential building inside the embassy compound for “routine furniture replacement” when he launched the attack.

“The security official, who was slightly wounded, defended himself,” a statement said.

“During the incident, the Jordanian worker was killed but the landlord was injured as well [and] later died of his wounds.

“According to the Vienna Convention, the security officer has immunity from investigation and imprisonment.”

Jordan initially said the guard could only leave after an investigation, but the diplomatic stand-off was resolved after a phone call between Mr Netanyahu and Jordan's King Abdullah II.

The pair discussed the metal detectors outside the al-Aqsa Mosque during the call, with unconfirmed reports claiming the embassy guard would be released in exchange for the scanners being removed.

The Israeli–Palestinian conflict intensifies Show all 10 1 /10 The Israeli–Palestinian conflict intensifies The Israeli–Palestinian conflict intensifies Medics evacuate a wounded man from the scene of an attack in Jerusalem. A Palestinian rammed a vehicle into a bus stop then got out and started stabbing people before he was shot dead AP The Israeli–Palestinian conflict intensifies Israeli ZAKA emergency response members carry the body of an Israeli at the scene of a shooting attack in Jerusalem. A pair of Palestinian men boarded a bus in Jerusalem and began shooting and stabbing passengers, while another assailant rammed a car into a bus station before stabbing bystanders, in near-simultaneous attacks that escalated a month long wave of violence AP The Israeli–Palestinian conflict intensifies Youths attend the funeral of Ahmad Sharake who was shot during clashes with Israeli forces in Jelazun refugee camp, near Ramallah, West Bank. Tensions in the area continue to run high following a series of stabbing attacks that have occurred around Israel in clashes between Palestinian youths and Israeli security forces Getty Images The Israeli–Palestinian conflict intensifies Palestinians throw molotov cocktail during clashes with Israeli troops near Ramallah, West Bank. Recent days have seen a series of stabbing attacks in Israel and the West Bank that have wounded several Israelis AP The Israeli–Palestinian conflict intensifies Women cry during the funeral of Palestinian teenager Ahmad Sharaka, 13, who was shot dead by Israeli forces during clashes at a checkpoint near Ramallah, at the family house in the Palestinian West Bank refugee camp of Jalazoun, Ramallah AP The Israeli–Palestinian conflict intensifies A wounded Palestinian boy and his father hold hands at a hospital after their house was brought down by an Israeli air strike in Gaza Reuters The Israeli–Palestinian conflict intensifies Palestinians look on after a protester is shot by Israelis soldiers during clashes at the Howara checkpoint near the West Bank city of Nablus EPA The Israeli–Palestinian conflict intensifies A lawyer wearing his official robes kicks a tear gas canister back toward Israeli soldiers during a demonstration by scores of Palestinian lawyers called for by the Palestinian Bar Association in solidarity with protesters at the Al-Aqsa mosque compound in Jerusalem's Old City, near Ramallah, West Bank AP The Israeli–Palestinian conflict intensifies Undercover Israeli soldiers detain a Palestinian in Ramallah Reuters The Israeli–Palestinian conflict intensifies Palestinian youth burn tyres during clashes with Israeli soldiers close to the Jewish settlement of Bet El, in the West Bank city of Ramallah, after Israel barred Palestinians from Jerusalem's Old City as tensions mounted following attacks that killed two Israelis and wounded a child

King Abdullah stressed the need to “remove the measures taken by the Israeli side since the recent crisis broke out” and to agree on steps that would prevent another escalation in the future, Jordan’s official news agency said.

The head of Israel's Shin Bet security agency had also met with officials in Jordan to resolve the crisis, the worst between the two countries in recent years.

The former enemies have a peace agreement and share security interests, but frequently disagree over policies at the shrine.

The 37-acre walled compound in Jerusalem is the third holiest site of Islam, after Mecca and Medina in Saudi Arabia. It is also the holiest site of Judaism, revered as the place where biblical temples once stood.

As part of intensifying diplomatic efforts, Donald Trump's envoy Jason Greenblatt met with Mr Netanyahu in Jerusalem on Monday.

Concern had reached the United Nations, where Middle East envoy Nikolay Mladenov warned of escalation if the crisis over the metal detectors was not resolved by Friday, when thousands of Muslims attend al-Aqsa for prayers.

After briefing the UN Security Council behind closed doors on Monday, he told reporters that it was “critically important” that the status quo which has been in place at the site since 1967 is preserved.

Israel captured the shrine, along with East Jerusalem, Gaza, the West Bank, Golan Heights and Sinai Peninsuala in the Six-Day War.

Since then, Muslims have administered the shrine, with Jews allowed to visit, but not to pray there.