A school in western Germany has banned the use of prayer rugs and other traditional Muslim rituals saying it is “provocative” to other students, sparking a debate about freedom of religion.

The Gymnasium Johannes Rau, in the city of Wuppertal, sent a letter to staff in February saying Muslim students had been using prayer rugs and performing ritual washing in the restrooms, and that they should get a “friendly reminder” it's not permitted and will be reported to the administration.

After strong criticism when the letter was posted last week on Facebook, municipal authorities said the wording was “unfortunate” and the school had only meant to bring affected students in to discuss a solution to allow their prayer, Bild newspaper reported on Thursday.

Authorities say the school was, however, legally allowed to stop people “praying in a provocative manner.”

According to Deutsche Welle, the letter said: "In recent weeks it has been increasingly observed that Muslim pupils in the school building are praying, clearly visible to others, signalled by ritual washings in the toilets, the rolling out of prayer mats, and taking up certain postures."

"This is not permitted."

A spokeswoman for the local district council told DW: "The ban on praying in a 'provocative way' in the school is intended to promote peaceful coexistence and ensure the school peace."