Israel will remove controversial metal detectors from the Temple Mount, following recent protests and violence. The detectors sparked outrage among Palestinians, who accused Israel of trying to assert control over one of Islam’s most sacred sites.

Israel’s security cabinet made the decision to remove the metal detectors from the entrance of the Jerusalem holy site on Monday night.

“The cabinet accepts the recommendation of security officials to replace the metal detectors with security inspection based on advanced technologies – smart inspection – and other means to ensure the security of visitors and worshipers in the Old City of Jerusalem,” the cabinet said in a statement, as quoted by Haaretz.

Israel has already begun dismantling the controversial detectors. Newly published photos show a worker removing one of the devices at the Lions’ Gate early Tuesday morning.

The detectors “will be replaced by advanced technological means” that will enable “smart inspection” in the Old City of Jerusalem, a senior Israeli official who was present at the meeting told Haaretz.

Police will introduce a new security system in the Old City, the official said, adding that the security cabinet allocated some 100 million shekels (US$28 million) in funding to the police and Ministry of Public Security.

The move sparked violent protests in Jerusalem and across the West Bank. On Friday, three Palestinians were killed during rallies in Jerusalem, while Palestinian Authority President Mahmoud Abbas froze all contacts with Israel following the dispute.

A fresh wave of unrest erupted shortly after evening prayers near the Lions’ Gate on Sunday, where thousands of Muslim worshipers had gathered to pray. After the prayers, Muslim activists refused Israeli orders to leave the area, sparking clashes with security forces.

The Palestinian Red Crescent said in a statement on Facebook that over 120 Palestinians were injured in the Sunday clashes with Israeli troops.

Ahead of the Sunday clashes, the NGO said that it had treated 591 patients since the metal detectors were introduced at the Temple Mount.

READ MORE: Israel sends more troops to West Bank after deadly stabbing attack

The UN’s Special Coordinator for the Middle East Peace Process, Nikolay Mladenov, said on Monday that tensions in Jerusalem could have catastrophic consequences across the Middle East.

“We have seen Palestinians being killed in clashes with Israeli security forces. We have seen an Israeli family being slaughtered in a terrorist attack in a settlement in the West Bank. All incidents deserve the full condemnation of the international community,” he said.

“During a phone call, His Majesty stressed the need to find an immediate solution and remove the causes of the ongoing crisis in the Al-Haram Al-Sharif (Muslim name for Temple Mount) to restore the situation to what it was before the outbreak of the crisis and full reopen the Al-Aqsa Mosque,” Jordan’s state news agency Petra reported.

The Temple Mount situation has increased tensions between Israel and Jordan. Thousands of people took to the streets of Jordan’s capital, Amman, to condemn the introduction of metal detectors on Friday. More than half of Jordan’s population is of Palestinian origin, according to Human Rights Watch (HRW).