The Monday unrest was the latest in a series of confrontations that threatened to push the contested city towards wider conflict.
In an apparent attempt to avoid further confrontation, Israeli authorities changed the planned route of a march by ultranationalist Jews through the Muslim Quarter of the Old City.
The marchers were ordered to avoid the area and sent on a different route circumventing the Muslim Quarter on their way to the Western Wall, the holiest site where Jews can pray.
But tensions remained high after Monday morning’s violence.
More than a dozen tear gas canisters and stun grenades landed in the Al-Aqsa Mosque, one of Islam’s holiest sites, as police and protesters faced off inside the walled compound that surrounds it, said an Associated Press photographer at the scene.
Smoke rose in front of the mosque and the iconic golden-domed shrine on the site, and rocks littered the nearby plaza.
Inside one area of the compound, shoes and debris lay scattered over ornate carpets.
More than 305 Palestinians were hurt, including 228 who went to hospitals and clinics for treatment, according to the Palestinian Red Crescent. Seven of the injured were in serious condition.
Police said 21 officers were hurt, including three who were hospitalised. Israeli paramedics said seven Israeli civilians were also hurt.
There have been almost nightly clashes during the Muslim holy month of Ramadan, already a time of heightened religious sensitivities.
Monday was expected to be particularly tense since Israelis mark it as Jerusalem Day to celebrate their capture of East Jerusalem in the 1967 Mideast war.
On Monday, two anti-Arab members of Israel’s parliament, surrounded by an entourage and police, pushed through a line of protesters in the Sheikh Jarrah neighbourhood.
Several Arab members of parliament were among those trying to stop Betzalel Smotrich and Itamar Ben Gvir, amid shouting and jostling.
At one point during the scrum, the protesters pounded on the sides of a dumpster, and one man yelled at Mr Smotrich in Arabic, “Get out of here, you dog!”
Mr Smotrich and Mr Ben Gvir eventually got to the other side of a police barricade and entered a house already inhabited by settlers.
Over the past few days, hundreds of Palestinians and several dozen police officers have been hurt in clashes in and around the Old City, including the sacred compound, which is known to Jews as the Temple Mount and to Muslims as the Noble Sanctuary.
The compound, which has been the trigger for rounds of Israel-Palestinian violence in the past, is Islam’s third holiest site and considered Judaism’s holiest.
An AP photographer at the scene said that early Monday morning, protesters had barricaded gates to the walled compound with wooden boards and scrap metal.
Sometime after 7am, clashes erupted, with those inside throwing stones at police deployed outside.
Police entered the compound, firing tear gas, rubber-coated steel pellets and stun grenades.
At some point during the morning about 400 people, both young protesters and older worshippers, were inside the carpeted Al-Aqsa Mosque. Police fired tear gas and stun grenades into the mosque.
Police said protesters hurled stones at officers and onto an adjoining roadway near the Western Wall, where thousands of Israeli Jews had gathered to pray.
After several days of Jerusalem confrontations, Israel has come under growing international criticism for its heavy-handed actions at the site, particularly during Ramadan.
The UN Security Council scheduled closed consultations on the situation on Monday.
Late Sunday, US National Security Adviser Jake Sullivan spoke to his Israeli counterpart, Meir Ben-Shabbat.
A White House statement said that Mr Sullivan called on Israel to “pursue appropriate measures to ensure calm” and expressed the US’s “serious concerns” about the ongoing violence and planned evictions.
Prime Minister Benjamin Netanyahu pushed back against the criticism on Monday, saying Israel was determined to ensure the rights of worship for all and that this “requires from time to time stand up and stand strong as Israeli police and our security forces are doing now.”
Ofir Gendelman, a spokesman for Mr Netanyahu, claimed in a tweet that “extremist Palestinians planned well in advance to carry out riots” at the holy site, sharing photos of mounds of stones and wooden barricades inside the compound.
Ayman Odeh, a leading Arab politician in Israel, blamed the violence on Israel’s discriminatory policies towards the Palestinians and said it had provoked the violence. “Wherever you find occupation, you will find resistance,” he said at a news conference in Sheikh Jarrah.
In other violence, Palestinian protesters hurled rocks at an Israeli vehicle driving just outside the Old City walls.
The driver later told public broadcaster Kan that his windows were smashed by stones and pepper spray shot into the car.
CCTV footage released by the police showed a crowd surrounding the car and pelting it with rocks when it swerved off the road and into a stone barrier and a bystander.
Police said two passengers were injured.
The day began with police announcing that Jews would be barred from visiting the holy site on Jerusalem Day, which is marked with a flag-waving parade through the Old City that is widely perceived by Palestinians as a provocative display in the contested city.
But just as the parade was about to begin, police said they were altering the route at the instruction of political leaders.
Several thousand people, many of them from Jewish settlements in the West Bank, were participating.
In the 1967 war in which Israel captured East Jerusalem, it also took the West Bank and Gaza Strip. It later annexed East Jerusalem and considers the entire city its capital.
The Palestinians seek all three areas for a future state, with East Jerusalem as their capital.
The recent round of violence began when Israel blocked off a popular spot where Muslims traditionally gather each night during Ramadan at the end of their daylong fast.
Israel later removed the restrictions, but clashes quickly resumed amid tensions over the planned eviction of Palestinians from Sheikh Jarrah.
Israel’s Supreme Court postponed a key ruling on Monday that could have forced dozens of Palestinians from their homes, citing the “circumstances.”
The tensions in Jerusalem have threatened to reverberate throughout the region.
Palestinian militants in the Gaza Strip have fired several barrages of rockets into Israel, and protesters allied with the ruling Hamas militant group have launched dozens of incendiary balloons into Israel, setting off fires across the southern part of the country.
Hamas issued an ultimatum, giving Israel until 6pm to remove its forces from the mosque compound and Sheikh Jarrah and release Palestinians detained in the latest clashes. It was not immediately clear what Hamas planned to do if its demands weren’t met.
In response, COGAT, the Israeli Defense Ministry organ responsible for crossings with the Gaza Strip, announced Monday that it was closing the Erez crossing to all but humanitarian and exceptional cases until further notice.