The incident was among the most serious in Jerusalem in recent years and threatened to raise Israeli-Palestinian tensions.
Israeli police chief Roni Alsheikh said the weapons used in the attack had been brought into the holy compound.
A hail of gunfire could be heard on grainy footage posted on social media.
“I didn’t really understand what was going on for a second, and then I realized that the terrorist that was apparently dead wasn’t and he got up and tried attacking the police officers and they shot and killed him on scene”, said the man.
Following the attack, Israeli police cleared the Al-Aqsa mosque and closed it for public. All three were residents of Umm el-Fahm, a large Arab town near the border of Israel and the West Bank.
Police identified them as Muhammad Ahmad Muhammad Jabareen, 29; Muhammad Hamed Abdel Latif Jabareen, 19; and Muhammad Ahmad Mafadal Jabareen, 29.
The gunmen were subsequently shot and killed by the police.
The site has been a flashpoint for violence in the past, with friction there sparking major rounds of Israeli-Palestinian violence, including a Palestinian uprising against Israeli occupation that lasted several years.
It is home to the Western Wall, a sacred Jewish site, as well as the Dome of the Rock, a prominent Muslim site. “Nationalist Israeli lawmakers called for extending visiting hours for Jews at the Muslim-administered site”.
Gradually reopening the site to worshippers and visitors “will be based on an estimate that will be made Sunday”, he said. The Mufti was taken into custody from the Bab Al-Asbat area (Lion’s Gate) after the Friday prayers.
Police said the attack occurred shortly after 7 a.m.
The U.S. ambassador to Israel, David Friedman, tweeted, “Shocked and horrified by the despicable attack today in Jerusalem”.
The operation showed the direction to the Palestinian nation and neutralized the Palestinian Authority (PA) efforts to relinquish main parts of Al-Aqsa mosque, he noted.
In a statement attributable to his spokesperson, the Secretary-General warned that this incident has the potential to ignite further violence.
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 claim not recognised internationally. He warned of the “repercussions of these measures or its exploitation by any side to change the religious and historical status of the holy places”. Jews are not allowed to pray at the site because of its sensitivity.
The Anti-Defamation League praised Abbas for acting “appropriately”, but blamed the attack on Palestinian incitement under his watch.
All three attackers were neautralised after exchange of gunfire, said the local authorities.