A Muslim student who wanted to pray during lunchtime was unsuccessful in a court fight on Tuesday against a strict school that had banned prayer on campus. A High Court judge said the female student had accepted when she enrolled in the school that she would be subject to religious restrictions. “She knew that the school is secular and her own evidence is that her mother wished her to go there because it was known to be strict,” Justice Thomas Linden wrote in an 83-page ruling. “Long before the prayer ritual policy was introduced, she and her friends believed that prayer was not permitted at school and she therefore made up for missed prayers when she got home.” The fight was over a rule put in place last year by the Michaela Community School after a small group of students who began praying in the schoolyard caused divisions at the school that spread to the community and led to a bomb threat. A Black teacher, who had confronted the praying students, was accused of “disgusting, Islamophobic behavior” and subjected to racist abuse in an online petition. The high-performing secular school in the Wembley area imposes a rigid set of rules and discipline on its diverse body of students, half of whom are Muslim. The Muslim girl, with her mother’s help, sued the school for “the kind of discrimination which makes religious minorities feel alienated from society.” The girl, who cannot be named by court order, said she wanted to pray over lunch break during a period of fall and winter when the height of the sun requires performing one of Islam’s five daily prayer rituals at that time of day. She sued the school over the policy, claiming it violated her rights and the European Convention on Human Rights. The school argued that any interference the ban had on the girl’s religious rights was justified because the prayer ritual conflicted with its strict rules and it was impractical to accommodate other students who wanted to pray. The school noted that Islam allows the prayer to be performed later in the day and said the student could transfer to a school that allowed prayer. The judge said the larger purpose of the ban on prayer — to promote the school’s ethos of integrating pupils from different faiths, cultures and ethnic backgrounds while minimizing social distinctions — outweighed its adverse impact on rights. Headteacher Katharine Birbalsingh, who calls herself Britain’s strictest headmistress, said the ruling was a victory for all schools. “A school should be free to do what is right for the pupils it serves,” she said in a statement. “Schools should not be forced by one child and her mother to change its approach simply because they have decided they don’t like something at the school.” The student and her mother said through their lawyers that they were upset with the ruling. “Even though I lost, I still feel that I did the right thing in seeking to challenge the ban,” the girl said. “I tried my best and was true to myself and my religion.”