A local council in Sydney, Australia, has blocked plans for a new synagogue, saying it may become a terrorist target and poses an unacceptable security risk.

Members of the Jewish community in the Bondi Beach neighborhood reacted angrily to the ruling, saying it rewards terrorism.

The refusal of Waverley Council to approve the new Orthodox house of worship was upheld in court on Wednesday.

The council said the proposed building raised “concerns as to the safety and security of future users of the Synagogue, nearby residents, motorists and pedestrians,” news.com.au reported.

The Land and Environment Court upheld the decision, basing its decision on the risk assessment submitted with the application along with proposed security measures.

“It would seem that a more sophisticated risk assessment process could be required for matters such as a potential terrorist threat,” Commissioner Graham Brown said.

The council told the court that “strong anti-Semitic undertones pervade much of ISIS’s online presence and literature” which has “manifested itself in both attacks and prevented attacks that have been aimed at Jewish communities in various parts of the world,” The Australian reported.

At the same time the council refused to allow architects to change the design of the planned building to increase security, saying that would make the building too ugly.

A policeman wearing a Christmas hat patrols Bondi Beach on Christmas Day in Sydney, Australia, on December 25, 2016. (AFP PHOTO / PETER PARKS)

A policeman wearing a Christmas hat patrols Bondi Beach on Christmas Day in Sydney, Australia, on December 25, 2016. (AFP PHOTO / PETER PARKS)

“It’s a very sad day for Australia if an established community, which needs a house of worship, is refused permission to build it because of fear that others may pose a threat,” New South Wales Jewish Board of Deputies chief executive Vic Alhadeff told news.com.au.

“This simply shows how we’re all losing our freedoms. Those who want us to be afraid are winning, and this ill-conceived judgment represents a dangerous precedent.”

The rabbi of the Chabad house that applied to build the synagogue, Yehoram Ulman, said the decision was “unprecedented” and that it “came as surprise and shock to the entire Jewish community.”

Ulman said that the court’s ruling to uphold the council’s decision threatened Jewish life in Australia.

“By pulling the terror threat argument they have shown that they are completely out of touch both with the reality and with needs of their constituency,” he said. “They have effectively placed in jeopardy the future of Jewish life in Australia.”

On Saturday Australian police stopped a terrorist plot to bring down an airplane, arresting four men in raids on homes in several Sydney suburbs. Four men of Lebanese origin were accused of plotting to bring down a plane using poisonous gas or a crude bomb disguised as a meat mincer.

Australia’s national terror alert level was raised in September 2014 amid concerns over attacks by individuals inspired by organizations such as the Islamic State group.

AP and AFP contributed to this report.