Three gunmen opened fire on Israeli police in Jerusalem Friday, killing two before fleeing to an ultra-sensitive holy site where they too were shot dead in one of the city's most serious incidents in recent years.
Palestinian president Mahmud Abbas and Israeli Prime Minister Benjamin Netanyahu spoke by phone later as tensions rose over the attack and its aftermath.
Israeli authorities also detained Jerusalem's top Muslim cleric as crowds gathered at the gates of the Old City after the attack, his son said.
The three attackers, Arab Israelis aged between 19 and 29, were shot dead by police. A body could be seen on the ground near the Al-Aqsa mosque in the Old City.
Police recovered two locally-made automatic rifles, a pistol and a knife, police spokesman Micky Rosenfeld told AFP.
A hail of gunfire could be heard on grainy footage posted on social media.
Police distributed a video they said showed at least two of the attackers arriving from the direction of the mosque and ambushing police officers.
Security forces later locked down the area and in a highly unusual move, the Al-Aqsa mosque was closed to Friday prayers.
Netanyahu signalled later in the day that the site would remain closed until at least Sunday.
The attackers were from the Arab Israeli city of Umm al-Fahm near the occupied West Bank.
Police identified them as Muhammad Ahmad Muhammad Jabareen, 29; Muhammad Hamed Abdel Latif Jabareen, 19; and Muhammad Ahmad Mafadal Jabareen, 29.
Arab Israelis are descendants of Palestinians who remained on their land following the creation of Israel in 1948. They largely identify with the Palestinian cause.
The police who were killed were Ha'il Satawi, 30, and Kamil Shanan, 22, both from the Druze minority.
The assailants were killed at the site known to Muslims as the Haram al-Sharif and to Jews as the Temple Mount, which is the holiest site in Judaism and the third-holiest in Islam.
It is the scene of regular clashes between Palestinians and Israeli police, but gunfire there is rare.
The site includes the Al-Aqsa mosque and the Dome of the Rock.
In the phone call with Netanyahu, Abbas expressed his "strong rejection and condemnation of the incident" and rejected "any act of violence from any side, especially in places of worship", official Palestinian news agency WAFA said.
The statement appeared stronger than previous such responses from Abbas, who has repeatedly called for non-violent resistance to Israel's occupation without specifically condemning Palestinian attacks.
Netanyahu said in a statement the security situation surrounding the holy site would be reassessed on Sunday.
Gradually reopening the site to worshippers and visitors "will be based on an estimate that will be made Sunday," he said.
- Mosque closed -
With Al-Aqsa closed, crowds gathered at Old City gates and held prayers there.
The grand mufti of Jerusalem Muhammad Ahmad Hussein, the city's highest Islamic authority, condemned the closure of the mosque compound for prayers.
"I have very little information about it, but it doesn't mean you should close the mosque for prayers," he told journalists at the nearby Lions Gate entrance to the Old City.
According to his son Jihad Hussein, he was later detained by Israeli police, who declined to comment.
He was released without charge after being questioned over his call for Muslims to come to Jerusalem after the holy site's closure, another of his sons told AFP.
Hamas, the Islamist movement that runs the Gaza Strip, called the attack "a natural response to Zionist terrorism and the desecration of the Al Aqsa mosque", referring to previous Israeli raids at the site.
UN Secretary-General Antonio Guterres warned the attack could spark more violence and urged all sides to avoid escalation.
Jordan, the custodian of the Al-Aqsa mosque compound, urged Israel to "immediately reopen" it.
- Flashpoint site -
The Haram al-Sharif / Temple Mount is central to the Israeli-Palestinian conflict and Palestinians fear Israel may one day seek to assert further control over it.
It lies in east Jerusalem, occupied by Israel in the 1967 Six-Day War and later annexed in a move never recognised by the international community.
Jews are allowed to visit, but are banned from praying there to avoid provoking tensions.
The site is administered by the Islamic Waqf organisation. Waqf officials said Israeli police detained its guards there after the attack.
A wave of unrest that broke out in October 2015 has claimed the lives of at least 281 Palestinians or Arab Israelis, 44 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 the Gaza Strip.
The violence had greatly subsided in recent months.