Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

JERUSALEM — Three gunmen opened fire at police near Jerusalem's holiest site on Friday, killing two officers, before the attackers were taken out by security forces, Israeli police said.

The gunmen arrived at the sacred site, known to Muslims as the Noble Sanctuary and to Jews as Temple Mount, and walked toward one of the Old City gates nearby, police spokeswoman Luba Simri said.

"When they saw policemen they shot toward them and then escaped toward one of the mosques in the Temple Mount compound," Simri said. "A chase ensued and the three terrorists were killed by police."

She said three firearms were found on their bodies.

The dead officers were later identified as Hail Stawi, 30, from Majar and Kaamil Snaan, 22, from Horfis, officials said.

Police said the Temple Mount would remain closed throughout the day as security assessments were carried out.

Shocked and horrified by the despicable attack today in Jerusalem. Terrorism must be condemned by all and defeated. We pray for the victims. — Ambassador Friedman (@USAmbIsrael) July 14, 2017

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Mobile phone video footage aired by Israeli media showed several policemen chasing a man and shooting him down at the site, which is a popular place for foreign tourists to visit. Israeli authorities are still working to identify the attackers, police spokesman Micky Rosenfeld said.

Tensions are often high around the marble-and-stone compound that houses the al-Aqsa Mosque and the golden Dome of the Rock. It is managed by Jordanian authorities and is adjacent to the Western Wall, the holiest site where Jews are permitted to pray.

An Israeli policeman is evacuated from the Temple Mount compound in Jerusalem's Old City on July 14, 2017. Abir Sultan / EPA

Israeli Prime Minister Benjamin Netanyahu sent his condolences to the officers families on Facebook.

Palestinian President Mahmoud Abbas condemned the attack in a phone call with Netanyahu, but also said closing down the area could have repercussions.

Police said Friday prayers for Muslims would not be held at the site following the attack.

However, the Palestinian Grand Mufti of Jerusalem, Mohammad Hussein, called on Palestinians to defy the shutdown.

"We completely reject the ban by Israeli authorities," Hussein told Reuters by telephone. "We have urged our Palestinian people to rush to al-Aqsa today and every day to hold their prayers."

Jihad Alghul, a spokesperson for the al-Aqsa Mosque later told NBC News that Israeli police had detained Hussein near the site as he prayed alongside a number of other worshipers.

A wave of Palestinian street attacks that began in 2015 has slowed but not stopped in recent months. At least 255 Palestinians and one Jordanian citizen have been killed since the violence began.

Israel says at least 173 of those killed were carrying out attacks while others died in clashes and protests. Thirty-eight Israelis, two U.S. tourists and a British student have been killed in stabbings, shootings and car-rammings.

Israeli security forces stand guard at one of the entrances to Al Aqsa mosque compound in the Jerusalem's Old City on July 14, 2017, following an alleged attack. AHMAD GHARABLI / AFP - Getty Images

Israel annexed East Jerusalem, where the Old City and the holy compound are located, after the 1967 Middle East war and regards all of Jerusalem as its capital, a move that is not recognized internationally.

Palestinians want East Jerusalem as the capital of the state they want to establish in the West Bank and Gaza Strip.

Israel blames the wave of violence on incitement by the Palestinian leadership. The Palestinian Authority, which exercises limited self-rule in the West Bank, says desperation over the occupation is the main driver.

The last U.S.-led attempt to broker peace between the Israelis and Palestinians broke down in 2014.