JERUSALEM (Reuters) - Prime Minister Benjamin Netanyahu considered removing on Thursday metal detectors at a Jerusalem holy site after their installation following a deadly attack last week stirred up Palestinian protests and threats of escalation.

Palestinian Hamas militants take part in a military show against Israel's newly-installed security measures at the entrance to the al-Aqsa mosque compound, in Khan Younis, in the southern Gaza Strip July 20, 2017. REUTERS/Ibraheem Abu Mustafa

There have been nightly confrontations between Palestinians hurling rocks and Israeli police using stun grenades in Israeli-annexed East Jerusalem since the devices were placed on Sunday at entrances to the Temple Mount-Noble Sanctuary compound.

Tensions were high ahead of Friday prayers when thousands of Muslims usually flock to al-Aqsa mosque, Islam’s third holiest shrine, in the compound above Judaism’s sacred Western Wall.

Palestinian factions vowed it would be a “day of rage” and confrontation with Israeli forces, which put five army regiments on standby to reinforce troops in the occupied West Bank.

Muslim religious authorities say the metal detectors violate a delicate agreement on worship and security arrangements at the Jerusalem site and have urged Palestinians not to pass through. Prayers have been held near an entrance to the complex.

Netanyahu held security consultations over the issue on his return to Israel from visits to France and Hungary. Israeli Public Security Minister Gilad Erdan said Netanyahu was expected to decide on a course of action during the evening meeting.

Far-right members of Netanyahu’s government have publicly urged him to keep the devices in place at the flashpoint site. But Israeli media reports said security chiefs were divided over the issue amid concerns about wider Palestinian unrest in East Jerusalem and the West Bank.

Slideshow ( 11 images )

“The prime minister is considering whether to change this decision, and that’s his prerogative,” Erdan said on Army Radio. He described the equipment as a legitimate security measure.

On July 14, three Arab-Israeli gunmen shot dead two Israeli policemen outside the Temple Mount-Noble Sanctuary complex in one of the most serious attacks in the area for years. The assailants were killed by security forces.

Israel briefly closed the compound, holy to Jews as the site of biblical temples, and installed the metal detectors which it said were commonplace at religious sites worldwide.

GAZA CONFRONTATION CALLED

In the West Bank on Thursday, a Palestinian tried to stab two Israeli soldiers and was shot dead, the army said. It was not immediately clear if the alleged attack was prompted by the tensions over the holy site.

Ismail Haniyeh, leader of the Hamas Islamist movement that rules Gaza, called on Palestinian demonstrators to confront Israeli troops along the enclave’s border on Friday.

“Let Friday be a turning point in the battle in the defense of Jerusalem and al-Aqsa,” Haniyeh said in a televised speech.

Nickolay Mladenov, the United Nations special coordinator for the long-stalled Israeli-Palestinian peace talks, called for calm. Turkish President Tayyip Erdogan, after discussing the stand-off with Palestinian President Mahmoud Abbas, spoke to Israeli President Reuven Rivlin by phone to urge an end to the metal-detector searches, sources in Erdogan’s office said.

Rivlin’s office said he had defended the security measures and assured Erdogan that freedom of worship would be maintained.

Israeli forces captured East Jerusalem, along with the West Bank, in the 1967 Middle East war. Palestinians want a state in the West Bank and Gaza Strip with East Jerusalem as its capital.

Israel considers all of Jerusalem its capital, a claim that is not recognized internationally.