Two Israeli policemen have been killed and a third wounded in a shooting attack near a sacred site in Jerusalem.
They were shot by three Israeli Arabs close to the compound known to Jews as the Temple Mount and to Muslims as Haram al-Sharif (Noble Sanctuary).
Police chased the attackers into the site and shot them dead.
There has been a wave of stabbings, shootings and car-rammings of Israelis predominantly by Palestinians or Israeli Arabs since late 2015.
Two of the previous attackers were Jordanians.
Police say the three men who carried out Friday's attack were aged between 19 and 29 and came from the northern Israeli city of Umm al-Fahm. Israel's Shin Bet security agency said that they were not previously known to the security services.
Police say the gunmen opened fire as they made their way from the Temple Mount/Haram al-Sharif towards Lions' Gate, an opening in the Old City walls about 100ft (30 metres) away.
The attackers were then pursued back to the compound, where they were killed.
Mobile phone footage showed at least one of the attackers in a confrontation with members of the security forces in the holy site before being shot.
The two policemen who died of their injuries in hospital were named as Advanced Staff Sergeant Major Kamil Shanan, aged 22, and Advanced Staff Sergeant Major Hail Sattawi, who was 30. They were Druze from Israel's northern Galilee region.
Analysis: Heightened tensions
Tom Bateman, BBC's Jerusalem correspondent
The Old City has often been a flashpoint in the conflict, which since the autumn of 2015 has seen an increase in violence involving attacks often carried out by lone individuals.
But an attack with guns by multiple assailants in the vicinity of the heavily guarded holy site, a very sensitive location, is highly unusual in recent times.
And the confirmation from Israel's security agency that the attackers were Israeli Arab citizens of Umm Al Fahm, and not previously known to the authorities, will also cause concern about the ability of Israel to prevent such incidents.
For the Israeli government, the event has crossed "red lines" and there will be fears of an increase in tensions following the severity of the attack and the rare decision to close the site.
Israeli Prime Minister Benjamin Netanyahu said it was "a sad day in which our Druze brothers pay the heaviest price in our joint mission to protect the security of our country. I salute them and their heroism".
Palestinian Authority President Mahmoud Abbas condemned the attack in a phone call to Mr Netanyahu, the prime minister's office said.
Mr Netanyahu has previously accused the Palestinian leader of failing to denounce such attacks.
In the wake of the incident, police sealed off the site to search it for weapons. It is the first time in decades that the compound, which contains the Dome of the Rock and al-Aqsa Mosque, has been closed for Muslim Friday prayers, which normally draws thousands of worshippers.
The site is administered by an Islamic authority (Waqf), though Israel is in charge of security there. Police are investigating how the attackers managed to smuggle in a handgun, sub-machine gun and knife.
The Palestinian Grand Mufti of Jerusalem, Mohammad Hussein, who had urged worshippers to defy the closure, was detained by police, but later released.
His son said the cleric was not facing any charges over his call for Muslims to converge on Jerusalem.
Elsewhere, a Palestinian was shot dead in clashes with Israeli forces at a refugee camp near Bethlehem on Friday, Palestinian sources said.
Barra Hamamdeh, 21, was killed during a raid by troops on the Dheisheh camp, the Palestinian Wafa news agency reported.
The Temple Mount/Haram al-Sharif is the holiest site in Judaism and third holiest in Islam and is one of the most politically sensitive sacred places in the world.
It is located in East Jerusalem, occupied by Israel since the 1967 Middle East war. Israel considers the entire city its sovereign capital, while Palestinians claim East Jerusalem as the capital of their sought-after future state.
Israel's Public Security Minister Gilad Erdan said the attack was "a serious and severe event in which red lines were crossed", adding that security arrangements in and around the site would be reviewed.
No group has said it was responsible, though the militant Palestinian Hamas movement, which runs the Gaza Strip, praised the attack as a "natural response to the Zionist ongoing crimes".
The shooting comes weeks after an Israeli policewoman was killed in a knife and gun attack outside the Old City by three Palestinians from the occupied West Bank.
Forty-four Israelis and five foreign nationals have been killed in nearly two years of such attacks.
At least 255 Palestinians - most of them attackers, Israel says - have also been killed in that period, news agencies report. Others have been killed in clashes with Israeli troops.
Israel says Palestinian incitement has fuelled the attacks. The Palestinian leadership has blamed frustration rooted in decades of Israeli occupation.