The Jerusalem Magistrate Court ruled on Monday that it is permitted for visitors to the Temple Mount to yell out “Am Yisrael Chai” (“The nation of Israel lives”) because it is a patriotic declaration, rather than a prayer.

In an agreement made between Israel and Jordan following Israel’s capture of Jerusalem’s Old City during the 1967 Six-Day War, Israel maintains security control of the Temple Mount, while Jordan’s religious Waqf controls religious practice. Because of the arrangement, Jews are barred from praying on the Temple Mount.

Monday’s court ruling is in the case of Israeli nationalist activist and attorney Itamar Ben Gvir, who in 2015 was ousted from the Temple Mount by police and detained for hours after shouting “Am Yisrael Chai!” during a visit to the site. At the time, Ben Gvir, who was touring with a group of Jews, was accosted by a Muslim woman who yelled “Allahu Akbar” (“Allah is the greatest”) at them. When he shouted back “Am Yisrael Chai” at her, he was immediately taken into custody by police, who told him he broke the law.

When Ben Gvir sued for wrongful detention, the judge found in his favor, stating that “during the tour and afterward, cries of ‘Allah is the greatest’ were heard, and there is nothing wrong with saying ‘the nation of Israel lives.’ ”

The judge agreed that Ben Gvir’s detention was baseless and criticized the police for taking no action against the Muslim woman who provoked him, telling him to “go away, you dog.”

Ben Gvir called his court victory “a gift to the Jewish people on the eve of Israel’s 70th Independence Day,” in an interview with Hadashot news.

“I believe that the time has come for the courts to rule that Jews are allowed to pray on the Temple Mount, just as Muslims are permitted to pray at the site,” he said. “There can be no wrongful discrimination at the most important site for the people of Israel.”

Two weeks ago, the Jordanian government filed an official complaint to Israel’s Foreign Ministry over a March court ruling allowing Jews to pray just outside the gated entrance to the Temple Mount holy site.

“In a democratic state, we do not distance and certainly do not arrest citizens who want to pray in a place where one is allowed to pray,” the court said in its ruling.

The attorney who brought that case to court—defending Israeli teens who had been arrested for praying at the location—was Itamar Ben Gvir.