Clashes broke out at the entrance to the al-Aqsa Mosque compound Thursday night between Muslim protesters and police, as tension mounted over Israel’s implementation this week of metal detectors at the gates of the holy site.

Dozens of Palestinians were injured in the violence and at least five police officers received medical attention, according to media reports.

The heightened security measures were put in place Sunday after an attack last Friday in which two Israeli police officers were fatally shot by three Palestinian Israeli gunmen. The gunmen, who Israeli police say came from inside the holy complex, were killed in a shootout with police.

Muslim leaders in Jerusalem have called on their followers to descend on the mosque on Friday, the Muslim holy day, in a form of protest against the metal detectors, which they believe are an attempt by Israel to force its sovereignty at the sensitive site.

The Israeli military has been put on high alert, media reported.

A Palestinian protester holds a copy of the Koran, Islam's holy book, and shouts slogans in front of Israeli security forces during a demonstration in Jerusalem's Old City on July 20, 2017, against new Israeli security measures at the Al-Aqsa Mosque compound. (Ahmad Gharabli/AFP/Getty Images)

Israeli Prime Minister Benjamin Netanyahu is facing increasing diplomatic pressure from the Palestinians and much of the Arab world to remove the metal detectors. Netanyahu met with security personnel late into the evening Thursday to decide whether to remove them.

An official told The Washington Post earlier Thursday that the prime minister’s position had not changed since security consultations early in the week. The official spoke on the condition of anonymity because he was not authorized to talk to reporters.

In a statement Saturday, Netanyahu said: “I held a discussion with the top security leadership and I instructed that metal detectors be placed at the entrance gates.”

He maintained his position as tensions have risen in Jerusalem this week.

[Gunmen kill 2 Israeli police officers at entrance to Jerusalem mosque complex]

The holy site is revered by both Muslims and Jews.

For Muslims, who refer to it as the Haram al-Sharif, it is the spot where the prophet Muhammad is said to have started his night journey to Mecca. Al-Aqsa is Islam’s third-holiest site after Mecca and Medina.

Israeli security forces stand guard as Palestinian Muslim worshipers pray outside the Lions Gate, a main entrance to the al-Aqsa Mosque compound, July 20, 2017. (Ahmad Gharabli/AFP/Getty Images)

Jews refer to the site as the Temple Mount. It is Judaism’s holiest site, said to contain the foundation stone of the world’s creation, the place Abraham was instructed by God to sacrifice his son, Isaac, and once the site of two Jewish temples.

Israel and Jordan share responsibility for running the site under a complicated status quo agreement that has been in place for decades. Any change to that agreement — by either side — is seen as a provocation. Under the arrangement, Muslims are allowed to enter and pray freely, while Jews and other visitors can go inside but are forbidden from praying there.

After last Friday’s attack, the compound was shut down by Israeli police as they swept the site for more weapons and tried to understand how such an assault could have happened. It was the first time that Muslim worshipers were not able to enter since 1969.

The site was reopened Sunday, but only for residents of Jerusalem. It was slowly reopened to other Muslims throughout the week, although with heightened security measures, including the metal detectors.

[Israel implements controversial security measures at holy site]

In a protest against the new security arrangements, the Waqf, or Islamic trust that runs the site day-to-day, instructed Muslim worshipers not to enter. Clashes have continued just outside the gates between Muslim protesters and Israeli police, who have used riot-dispersal methods, such as rubber bullets, to control the growing crowds.

A showdown between worshipers and police is expected Friday, the Muslim holy day, unless Israel removes the metal detectors and relaxes its security.

“This is a new procedure in order to prevent people from worshiping and is given under the excuse of security,” said Ibrahim Awadallah, deputy minister of the Waqf committee in Jerusalem.

“We are not talking about a supermarket or a nightclub or an airport where you need an electric gate. The number of worshipers who come to al-Aqsa is huge. Metal detectors will delay them, not to mention humiliate them,” he said.

Awadallah said Muslims fear that Israel plans to divide the compound and give part of it to Jewish worshipers. Some senior Israeli ministers and political leaders have broached the prospect in the past.

“I am leading the effort against lone-wolf terrorism in Israel, and one of the characteristics is that they copy each other,” said Israel’s minister of public security, Gilad Erdan. “Friday's terrorists have been glorified, and others might follow in their footsteps when others realize the Temple Mount is a place you can smuggle weapons and explosives into.”

“Many, many mosques around the world have exactly the same security checks, and many use metal detectors. Any protest over this is really an issue over who has sovereignty at the Temple Mount,” said Erdan, who oversees Israel’s police force.

He said that both he and the police are urging the prime minister to keep the metal detectors in place.

[Jewish activists want to pray on Temple Mount, alarming Muslims]

“The police believe they can handle any unrest that might happen in Jerusalem,” he said.

In a statement Wednesday, the White House said it was concerned about the tensions in Jerusalem and has urged Israel and Jordan to find a solution.

Israeli police spokesman Micky Rosenfeld said the police were ready to deal with the large number of people expected to show up at the mosque to worship Friday.

“If the security measures stay as they are, then whoever goes through the metal detectors will be able to pray at the mosque,” he said.

Israeli legislator Yaakov Peri, a former head of Israel’s general security agency Shin Bet, called the situation in Jerusalem “fragile and sensitive.”

“It’s in the interest of everybody — Islam, Judaism, governments, people, Jews and Palestinians — to try to protect these holy places better than they were protected before the act of terror,” he said. “Every sensitive holy place in the world is protected, and I don’t think Israel adding tools to tighten security means there is a change in the status quo.”

Sufian Taha contributed to this report.

Read more:

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news