An Israeli appeal court overturned on Wednesday a ruling by a lower magistrate who had stirred Palestinian anger by questioning the legality of barring Jewish prayer at a contested Jerusalem shrine.
Al-Aqsa Mosque compound, which Jews revere as a vestige of their two ancient temples, is at the heart of the Israeli-Palestinian conflict. Under a decades-old "status quo" arrangement with Muslim authorities, Israel allows Jews to visit only if they refrain from religious rites.
Three Jewish youths who received a restraining order after praying at the site successfully challenged the police decision at Jerusalem Magistrates Court, which ruled on Sunday that their actions had not constituted a breach of the peace.
That prompted protests from the Palestinian leadership, threats from Palestinian militants and a pledge from Israel that the status quo would be preserved.
The state filed a counter-appeal on Wednesday with Jerusalem District Court, which found in favor after nightfall.
"The special sensitivity of the Temple Mount cannot be overstated," Judge Einat Avman-Moller said in her ruling, using the Hebrew name for a site Muslims know as the Noble Sanctuary.
A right to freedom of Jewish worship there "is not absolute, and should be superseded by other interests, among them the safeguarding of public order," she said.
In a statement before Wednesday's ruling, Nati Rom, a lawyer for the defendants, said: "It is strange and regrettable that, in the 21st century, in a Jewish and democratic country, the basic human rights of Jews would be so harmed."
With Jewish visits increasing in number, including over the Muslim fasting month of Ramadan that coincided this year with the Jewish Passover festival, Palestinians have cried foul.
Jordan, a U.S.-backed Israeli security partner that serves as custodian of al-Aqsa, has also voiced concern.
Tensions have been further stoked by a flag march due to be held by nationalist Jews in Jerusalem's Old City on Sunday, marking its capture by Israel from Jordan in the 1967 Six-Day War. The annual event is resented by Palestinians, who want the Old City and other parts of East Jerusalem as capital of their hoped-for future state.
"Our biggest fear is that the marchers will enter the al-Aqsa Mosque compound and harm it," said Hezbollah leader Hassan Nasrallah during a speech on Lebanon's Liberation Day.
"I want to tell the Israeli government and everyone involved – any harm to al-Aqsa and the Dome of the Rock will lead to a major explosion in the region. This is a provocation against all Arab and Muslim peoples."
Other Arab and Muslim elements have also expressed similar concerns regarding Israel's decision to allow the flag day march to pass through the Muslim Quarter, as well as through the volatile Damascus Gate area.