JERUSALEM -- Clashes erupted Thursday at a sacred shrine in Jerusalem as thousands of Muslims rushed to pray at the site for the first time in nearly two weeks following Israel's removal of security devices installed there after a deadly attack.

Israeli police fired tear gas and rubber bullets as Palestinians threw stones in the walled compound that is holy to both Muslims and Jews.

The Palestinian Red Crescent said 37 Palestinians were wounded, including some by rubber bullets and beatings. It said several people suffered broken bones.

The new violence in Jerusalem's Old City came shortly after worshippers rushed to pray at the Al-Aqsa Mosque that was reopened following an 11-day Muslim prayer boycott over the Israeli security measures.

Israeli police say they responded after stones were thrown at officers at the gates to the site. The Red Crescent said tensions arose when Israeli troops closed one of the gates as large numbers of worshippers tried to enter.

The shrine had been at the centre of an Israeli-Palestinian standoff over recent Israeli security installations at the site. Israel has removed the devices.

Palestinians had been praying in Jerusalem's streets outside the shrine to protest the security measures taken since the July 14 attack. Israel installed the new security devices at the shrine after Israeli Arabs shot and killed two police officers from within the site.

Once Israel removed metal detectors and cameras Thursday, Muslim leaders told the faithful to return to pray at the Al-Aqsa Mosque in the compound. Droves of Palestinians entered for afternoon prayers, some waving national flags.

"After extensive discussion and after achieving this victory in this round we call on our people in Jerusalem and inside (Israel) and anyone who can access the Al-Aqsa Mosque to enter ... en masse," the Islamic leaders said in a statement.

Abdel Azim Salhab of the Waqf, Jordan's religious body that administers the site, had urged imams to close other Jerusalem mosques Friday so worshippers will pray only at the Al-Aqsa Mosque.

Friday prayers are the highlight of the Muslim religious week. Thousands of Muslims typically worship at the compound.

Salhab said all devices had been removed from the entrances but he didn't know if security cameras mounted on the wall of the compound were also dismantled. If they remain, he said, then "we reject it."

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

Jordan is the Muslim custodian of the shrine -- 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.

Jews also 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.

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

He blasted Netanyahu for hugging the security guard who killed two Jordanians at the Israeli Embassy over the weekend after a 16-year-old attacked the guard with a screwdriver.

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

The embassy incident inflamed public opinion in Jordan, where a 1994 peace treaty with Israel remains unpopular.

Netanyahu praised the guard, saying he had acted "calmly."

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

The incident "will have a direct impact on the nature of our relations," he added.

Israel said the security measures at the Jerusalem shrine were needed to prevent more attacks and were standard procedure around the world. Palestinians claimed Israel was trying to expand its control over the site, which Israel denied.

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

After some of the security devices were removed early Thursday, Palestinians danced, chanted "God is great" and set off fireworks. Metal detectors were dismantled earlier this week.

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

The fate of the site is an emotional issue at the heart of the conflict between Israel and the Palestinians. Even the smallest perceived change to delicate arrangements for the site sparks tensions.

Israel's decision to add security measures there outraged Muslim and triggered protests, and low-level clashes have continued in and around Jerusalem in the days since.

The crisis highlighted the deep distrust between Israel and the Palestinians over the holy site.

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

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

Bennett, leader of the Jewish Home party, told Army Radio that every time 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."

The Islamic militant group that rules Gaza praised the move. Izzat Risheq, a senior Hamas leader, tweeted that Palestinians achieved a "historic victory."

Separately, Netanyahu called for the death penalty for a Palestinian who sneaked into a West Bank settlement home July 21 and killed three Israelis.

Netanyahu visited the family of the three Israelis stabbed to death and said that "the time has come for the death penalty for terrorists in extreme cases."

Though Israeli law permits the death penalty, the country has put only one person to death: Nazi war criminal Adolf Eichmann, in 1962.

Netanyahu said his position on the 19-year-old Palestinian attacker, who was wounded by an off-duty soldier, "is that he needs to be put to death."

Several members of Netanyahu's cabinet issued similar calls recently.