Three Arab-Israeli gunmen opened fire at police near Jerusalem's holiest site, killing two Israeli policemen, before security forces killed the attackers, police said.
Israeli authorities shut the area after the attacks – the most serious incident in years close to the highly sensitive compound, which is holy to both Muslims and Jews.
The closure stopped Muslims gathering there for Friday prayers, drawing a call for resistance from Palestinian leaders.
The gunmen arrived at the sacred site, known to Muslims as the Noble Sanctuary and to Jews as Temple Mount, and walked towards one of the Old City gates nearby, police spokeswoman Luba Simri said.
"When they saw policemen they shot towards them and then escaped towards one of the mosques in the Temple Mount compound," she said.
"A chase ensued and the three terrorists were killed by police."
She said three firearms were found on their bodies.
The Shin Bet Israeli internal security service said the three gunmen were Arab citizens of Israel.
There was no immediate comment from the Palestinan Authority, which exercises limited self-rule in the West Bank.
No group claimed responsibility, though the Palestinian Islamist group Hamas, which rules Gaza, praised the attack.
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.
The Israeli ambulance service Magen David Adom said a third policeman was lightly wounded in the incident.
A wave of unrest that broke out in October 2015 has claimed the lives of at least 277 Palestinians, 42 Israelis, two Americans, two Jordanians, an Eritrean, a Sudanese and a Briton, according to an AFP toll.
Israeli authorities say most of the Palestinians killed were carrying out knife, gun or car-ramming attacks.
Others were shot dead in protests and clashes, while some were killed in Israeli air strikes on Gaza.
The violence has greatly subsided in recent months.