Israeli forces prepared for possible violent protests in Jerusalem and the West Bank Friday, as flaring tensions surrounding the Temple Mount persisted even as Muslim leaders ended their protest over Israeli security arrangements at the flashpoint holy site.

Extra police and border guard gendarmes were ordered deployed to Jerusalem hotspots, and the military was beefing up its presence in the West Bank amid expectations of possible violent protests following midday prayers Friday, a week after heavy clashes in the capital and the West Bank left five Palestinians dead.

Tensions persisted Thursday, even after Israel removed the last of a series of security measures erected at entrances to the Temple Mount following a July 14 terror attack in which assailants used guns smuggled into the compound to kill two policemen guarding the area.

Palestinians had celebrated Thursday morning as Israel rolled back security measures and thousands of worshipers heeded a call by Muslim authorities to assemble for prayers at the Al-Aqsa 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.

Clashes also broke out on the mount as Palestinians attempted to fly the Palestinian flag from the mosque and threw rocks at Israeli forces, which some projectiles flying onto the Western Wall plaza below.

Ten police officers were injured in the ensuing clashes, according to Israel’s Channel 2 news. Police confirmed one injury.

Police and worshippers scuffle in Jerusalem's Old City, Thursday, July 27, 2017. (AP/Mahmoud Illean)

Police and worshippers scuffle in Jerusalem’s Old City, Thursday, July 27, 2017. (AP/Mahmoud Illean)

Some 115 Palestinians were treated for injuries both inside the compound and in the surrounding area, according to the Palestinian Red Crescent. A spokesperson said the injuries were mainly caused by rubber bullets, burns and bruises. Fifteen people were hospitalized, it said.

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

Later Thursday night, police removed dozens of Palestinian youths who had barricaded themselves inside the mosque. Over 100 people were arrested and 15 were injured in the ensuing fighting with police, according to Palestinian media.

Police said they decided to storm the mosque and forcibly remove the protesters after several calls by both police and officials from the Waqf Islamic trust that administers the site failed to move them. A spokesperson said the decision was part of a bid to keep a lid on violence on Friday, the Muslim holy day.

Israeli security forces fire tear-gas to disperse Palestinians after clashes broke out at the Temple Mount compound in Jerusalem's Old City on July 27, 2017. (AFP PHOTO / AHMAD GHARABLI)

Israeli security forces fire tear-gas to disperse Palestinians after clashes broke out at the Temple Mount compound in Jerusalem’s Old City on July 27, 2017. (AFP PHOTO / AHMAD GHARABLI)

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.

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

Israeli officials had been hoping a planned “day of rage” by both the Fatah and Hamas Palestinian factions would be called off after the security measures were removed, but said they were prepared for protests.

On Wednesday, a youth group affiliated with Palestinian Authority President Mahmoud Abbas’s Fatah movement said it would attempt to “isolate settlements” by blocking West Bank roads. The Tanzim militia, which had been a key player in violence at the start of the Second Intifada, was invited by Palestinian officials to mobilize protests for Friday.

Palestinian protesters clash with Israeli security forces near the Jewish settlement of Beit El, near the West Bank city of Ramallah, on July 24, 2017. (AFP/Abbas Momani)

Palestinian protesters clash with Israeli security forces near the Jewish settlement of Beit El, near the West Bank city of Ramallah, on July 24, 2017. (AFP/Abbas Momani)

At the same time, the Hamas terror group held a “victory” parade in Gaza and urged violent protests in the West Bank.

A week ago, with metal detectors still in place, clashes broke out in several Jerusalem neighborhoods and the West Bank after Muslims held large prayer protests at midday Friday. On Friday night, a Palestinian teen inspired by the fight over the Temple Mount sneaked into the settlement of Halamish, near Ramallah, and stabbed to death three members of a family celebrating Shabbat.

A photo released by the Israeli military shows the scene of the July 21, 2017 terror attack in a family home in the settlement of Halamish (IDF Spokesperson)

A photo released by the Israeli military shows the scene of the July 21, 2017 terror attack in a family home in the settlement of Halamish (IDF Spokesperson)

Daily protests had continued even after Israel removed the metal detectors on Tuesday. On Thursday, Mohammed Kanaan, a 26-year-old Palestinian who was wounded earlier this week outside Jerusalem in a confrontation with Israeli troops died, said Dr. Ahmad Betawi, head of a West Bank hospital.

Speaking to reporters shortly after the last security devices were removed, Jerusalem police chief Yoram Halevi said authorities would do all they could to prevent further unrest but protesters “should not be surprised” if police respond to disturbances with force.

Worshipers wave a Palestinian flag and flash the victory gesture in front of the Dome of the Rock on the Temple Mount on July 27, 2017. (AFP Photo/Ahmad Gharabli)

Worshipers wave a Palestinian flag and flash the victory gesture in front of the Dome of the Rock on the Temple Mount on July 27, 2017. (AFP Photo/Ahmad Gharabli)

“No one should try to test us tomorrow,” he told reporters, promising calm if worshipers follow the instruction of their religious leaders to end the protests. But “if there are people who try tomorrow to disturb the peace, to harm police or citizens, they should not be surprised: There will be casualties and people injured,” he said, reiterating it two more times during the course of his public comments.

“Don’t test us, because we know how to respond, and we know how to respond directly and forcefully,” Halevi added emphatically.

Halevi said that while Friday prayers may see additional “victory celebrations,” Palestinians should keep in mind that police are still in charge of Temple Mount security.

Jerusalem District Police Commander, Yoram Halevi gives a statement to the media about recent events at the Western Wall, in Jerusalem's Old City, July 27, 2017. (Yonatan Sindel/Flash90)

Jerusalem District Police Commander, Yoram Halevi gives a statement to the media about recent events at the Western Wall, in Jerusalem’s Old City, July 27, 2017. (Yonatan Sindel/Flash90)

Despite the reduction in security measures, the police chief promised not to back down on checking worshipers entering the compound. “We will check anyone suspicious, anyone who we think could disturb the peace, anyone who could be an attacker. They will be stopped at the gate, they will be checked as we have done in the past,” Halevi said.

The fate of the Temple Mount 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.

Palestinians celebrate outside the Lions Gate entrance to Jerusalem's Old City on July 27, 2017 after more Israeli barriers were removed from the Temple Mount entrance. (AFP/ AHMAD GHARABLI)

Palestinians celebrate outside the Lions Gate entrance to Jerusalem’s Old City on July 27, 2017 after more Israeli barriers were removed from the Temple Mount entrance. (AFP/ AHMAD GHARABLI)

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.

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.”

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.”

Palestinian wave a Palestinian flag from atop the Al-Aqsa Mosque on the Temple Mount on July 27, 2017. (AFP Photo/Ahmad Gharabli)

Palestinian wave a Palestinian flag from atop the Al-Aqsa Mosque on the Temple Mount on July 27, 2017. (AFP Photo/Ahmad Gharabli)

At an emergency meeting of the Arab League in Cairo over the issue, Israel was accused of “playing with fire” by Arab League chief Ahmed Abul Gheit said

“Handling holy sites lightly and with this level of arrogance seriously threatens to ignite a religious war, since not one single Muslim in the world would accept the desecration of (Jerusalem’s) Al-Aqsa mosque,” he said.

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 run you harm deterrence.”