Jerusalem (CNN) Israel is removing recently installed metal detectors outside the entrance to the al-Aqsa mosque in the Old City of Jerusalem, the Israeli Prime Minister's Office announced early Tuesday morning.

The metal detectors, installed nearly two weeks ago after an attack at the site, have been a source of increased tension in the wider region, including widespread Palestinian protests across Jerusalem and the West Bank, as well as diplomatic tension between Israel and Jordan.

The decision to remove the metal detectors, made by the country's security cabinet, was based on the recommendation of Israel's security agencies, the statement said. Instead of metal detectors, Israel plans to install unspecified advanced technologies and "smart inspection."

Security forces stand guard outside the Israeli embassy in the residential Rabiyeh neighbourhood of the Jordanian capital Amman on July 23.

The security cabinet decision comes amid high-level discussions between Israel and Jordan aimed at easing tensions between the two countries.

The announcement of the removal came only hours after the Prime Minister's Office said staff of the Israeli embassy in Jordan, including a security guard involved in a deadly weekend incident, returned to Israel on Monday night.

The move came as Israeli Prime Minister Benjamin Netanyahu and King Abdullah II of Jordan spoke on the phone Monday night in an effort to defuse a diplomatic row in the aftermath of Sunday's attack on the Israeli embassy in Amman.

In Sunday's attack, an Israeli security guard was stabbed and two Jordanians inside the embassy compound were killed, according to Israel's Ministry of Foreign Affairs. The incident strained already tense relations between the two countries. Earlier Monday, Jordan had said all the embassy staff could leave except the security guard.

Increasing tensions

As tensions in the region have escalated, the international community has become involved to find a peaceful resolution. President Donald Trump's special representative for international negotiations, Jason Greenblatt, arrived in Israel on Monday afternoon in an attempt to reduce tensions.

"We are engaged in discussions with the relevant parties and are committed to finding a resolution to the ongoing security issues," said a senior administration official.

The United States, Russia, United Nations, and European Union -- the Quartet -- urged all sides to "demonstrate maximum restraint" and "refrain from provocative actions" in a statement released over the weekend.

According to the Israeli Ministry of Foreign Affairs, Sunday's attack unfolded when a Jordanian, who was in the embassy compound for routine furniture replacement, attacked an Israeli security official from behind and stabbed him with a screwdriver.

"The security official, who was slightly wounded, defended himself. During the incident, the Jordanian worker was killed, but the landlord was injured as well. He later died of his wounds," the statement said Monday.

The Jordanian Public Security Directorate confirmed on Monday in a statement that the second Jordanian man died. The statement identified him as "a physician who was at the scene of the shooting."

JUST WATCHED Palestinians killed in Jerusalem clashes Replay More Videos ... MUST WATCH Palestinians killed in Jerusalem clashes 01:27

"In accordance with the Vienna Convention, the security officer has immunity from investigation and imprisonment," the Israeli foreign ministry said.

King Abdullah and Netanyahu also spoke on Monday about the ongoing tensions at one of Jerusalem's holiest sites, known as the Temple Mount to Jews and the Noble Sanctuary to Muslims.

A statement from Jordan's Royal Court said King Abdullah II "stressed the need to find an immediate solution and remove the causes to the ongoing crisis" at the site.

A significant percentage of Jordan's population is of Palestinian origin and a Jordanian religious authority, the Waqf, administers the Temple Mount and Noble Sanctuary.

On Friday, thousands of Jordanians took to the streets to protest the situation in Jerusalem.

Deadly weekend

Earlier in the weekend, on Friday night, three Israelis were killed in their home in the West Bank settlement of Halamish. Police said a young Palestinian man breached the settlement's security fence and stabbed them to death. Yosef Solomon, 70, and his son, Elad, and daughter, Chaya, died in the attack.

In a statement posted on Facebook before the attack, the assailant said he was motivated by the Israeli government's recent restrictions on al-Aqsa Mosque in Jerusalem, according to an Israeli military spokesman.

Palestinian militant group Hamas praised the attack, saying: "We bless the heroic Halamish operation which came as a result to the Zionist occupation violations and crimes against our people in Jerusalem and al-Aqsa Mosque," the group said on Twitter.

Netanyahu said Israel would look to destroy the home of the attacker as soon as possible, a routine measure intended as a deterrent against future attacks.

The Israeli military arrested more than 20 Palestinians in an overnight sweep on Sunday near the site of Friday night's attack, according to an Israeli military official. The Palestinians were suspected of preparing attacks in the immediate future or of being members of the militant group Hamas, the official said.

Meanwhile, four Palestinians were killed in ongoing demonstrations against Israeli security forces Friday and Saturday.

President Abbas suspended all contacts between the Palestinian Authority and the Israeli government on Friday in protest of the metal detectors.