JERUSALEM -- Violence returned Thursday to a sacred site in Jerusalem as Palestinians gathering for prayers at the Al-Aqsa Mosque compound clashed with Israeli police nearly two weeks after a deadly attack there.

Earlier in the day, Palestinians had celebrated as Israel rolled back security measures and thousands of worshippers heeded a call by Muslim authorities to assemble for prayers at the mosque for the first time in 11 days.

But as crowds pushed at one of the gates to the compound in the Old City, police fired tear gas and rubber bullets to disperse them, with dozens reported wounded.

Israeli border police officers throw tear gas towards Palestinians next to the Dome of the Rock Mosque in the Al Aqsa Mosque compound in Thursday, July 27, 2017. Mahmoud Illean / AP

Israeli Prime Minister Benjamin Netanyahu ordered police reinforcements in Jerusalem following the latest unrest, and police were weighing limiting entry of younger men in anticipation of mass protests for Friday prayers -- the highlight of the Muslim religious week.

Get Breaking News Delivered to Your Inbox

Israeli troops in the West Bank were put on high alert and prepared for more violence Friday, a military official said.

Tensions have been running high at the site sacred to both Muslims and Jews since three Israeli Arab gunmen killed two police officers on July 14, prompting Israel to install metal detectors and other security devices.

Israel said the measures were needed to prevent more attacks. Palestinians claimed Israel was trying to expand its control over the site, which Israel denied.

The security measures outraged Muslims and triggered protests, and low-level clashes have continued in and around Jerusalem since then, highlighting the deep distrust between Israel and the Palestinians over the holy site.

In protest, Palestinians have prayed in Jerusalem's streets outside the shrine since the July 14 attack. Israel removed the devices Thursday and the crisis appeared to be easing as Muslim leaders told the faithful to return to pray at the Al-Aqsa Mosque.

Droves of Palestinians entered for afternoon prayers. A handful scaled the roof of the mosque and planted Palestinian flags above the entrance. Police later removed them.

Israeli police officers scuffle with Palestinians near the Dome of the Rock Mosque in the Al Aqsa Mosque compound in Jerusalem's Old City, Thursday, July 27, 2017. Mahmoud Illean/AP

Just before worship began, police shot tear gas and rubber bullets at the massing crowd. The Red Crescent said tensions rose as Israeli troops closed one of the gates to the compound as large numbers of worshippers tried to enter, and that 96 people were wounded in the melee. Police said officers were struck by stones and responded with riot dispersal methods, and a spokesman said at least two officers were wounded.

More clashes between Palestinians and Israeli security forces erupted after nightfall, with the Red Crescent saying at least eight people were hurt.

In addition, a 26-year-old Palestinian who was wounded earlier this week outside Jerusalem in a confrontation with Israeli troops has died, said Dr. Ahmad Betawi, head of a West Bank hospital. At least four other Palestinians have died in the past week in violent clashes with Israeli security forces.

Rival Palestinian factions Fatah and Hamas both issued calls earlier this week for mass protests on Friday.

The fate of the shrine is an emotional issue at the heart of the Israeli-Palestinian conflict. Even the smallest perceived change to delicate arrangements pertaining to the site sparks tensions.

Jews revere the hilltop compound as the Temple Mount, site of the two Jewish biblical temples. It is the holiest site in Judaism and the nearby Western Wall, a remnant of one of the temples, is the holiest place where Jews can pray.

The walled compound is home to the Al-Aqsa Mosque and the Dome of the Rock. It is Islam's third-holiest site after Mecca and Medina in Saudi Arabia. Muslims believe the site marks the spot where the Prophet Muhammad ascended to heaven.

Israel had faced intense pressure over the security devices and said it plans to install sophisticated cameras instead. Palestinian leaders and Muslim clerics had insisted Israel restore the situation at the shrine to what it was before the attack.

The simmering crisis has sparked some of the worst street clashes in years and threatened to draw Israel into conflict with other Arab and Muslim nations.

King Abdullah of Jordan, which is the Muslim custodian of the shrine, urged Israel to "respect the historical and legal situation in the holy shrine to prevent the recurrence of these crises."

Abdullah criticized Israel's handling of a deadly altercation last weekend at its embassy in Amman involving an Israeli security guard, calling Netanyahu's conduct "provocative."

Policemen are seen near the Israeli embassy in Amman, Jordan, July 23, 2017. REUTERS/Stringer

He blasted Netanyahu for praising an Israeli security guard who killed two Jordanians at the embassy after a 16-year-old attacked the guard with a screwdriver.

"Such unacceptable and provocative behavior at all levels infuriates all of us, leads to insecurity and fuels extremism in the region," Abdullah said.

Abdullah told senior officials that Netanyahu needs to take legal measures that "guarantee the trial of the murderer."

He said the incident "will have a direct impact on the nature of our relations."

The Islamic militant group that rules Gaza had praised the Israeli rollback of security at the sacred site. Izzat Risheq, a senior Hamas leader, tweeted that Palestinians achieved a "historic victory."

Netanyahu is trying to halt a wave of unrest while not appearing to his hard-line base as capitulating.

He sought to fend off the criticism. He took a hard line against Palestinian violence by saying Thursday "the time has come for the death penalty for terrorists in extreme cases."

A senior member of Netanyahu's coalition government criticized Israel's dismantling of the security devices, saying it could bring more violence.

Naftali Bennett, leader of the Jewish Home party, told Army Radio that "every time the state of Israel folds in a strategic way, we get hit with an Intifada. You seemingly benefit in the short term, but in the long term you harm deterrence."