The school allows Muslim girls to wear scarves but not niqabs
Lawyers for a 12-year-old girl say her school is "irrational" in not letting her wear a full facial veil because her three sisters were allowed to do so.
They told a judge at the High Court that the girl's elder sisters went to the same school in Buckinghamshire and had worn the niqab.
The school, which is not being named for legal reasons, says the niqab does not comply with its uniform code.
The girl's family are seeking a judicial review of the school's ruling.
A judge heard that the girl's sisters had all attended the same school in the past - two of them under the present head teacher - and had all worn the niqab with no objections.
The niqab covers all of the face except for the eyes.
The three young women had participated fully in school activities and the school was "very supportive of them as devout Muslims and the way they expressed their faith," said Dan Squires, lawyer for their sister.
It was not rational to stop the youngest girl wearing the niqab, he told Mr Justice Silber.
The girl is protected by an anonymity order, as is her Buckinghamshire school, and was only referred to as 'X' in the case.
Her lawyers also argued that the school's ruling was breaching her right to freedom of "thought, conscience and religion" under Article 9 of the European Convention on Human Rights.
The school says the full face veil does not comply with its uniform code because it hampers communication.
The girl involved has not been excluded from the secondary school but has been asked not to come wearing the niqab.
Buckinghamshire Council had warned that the school might be forced to back down because of the high cost of the legal proceedings.
But The Muslim Educational Centre of Oxford has said it will raise funds for the school. Its chairman Taj Hargey said he wanted to step in to show that not all Muslims agreed with the niqab.
The pupil, who joined the school in September, has not been in lessons since October. She has had some tuition at home.
At the High Court in London, Mr Squires told the judge that the school's written policy on uniform over the years had not mentioned Muslim dress.
There was an unwritten policy based on "custom and practice" regarding additional clothing which could be worn.
He said there was no indication that the policy on the niqab would change until the head teacher saw 'X' standing in a lunch queue in early September last year.
Last year, the Law Lords ruled that a Luton school was justified in banning the jilbab, a long gown, but it took a lengthy legal battle before this was established.
Government guidance says schools can decide their own uniform code in consultation with the community.
During the hearing, Mr Justice Silber invited argument from counsel on the issue of school security and the need to see facial expressions.
He referred to the 1996 Dunblane massacre, saying: "Everyone knows these days how security-conscious head teachers have to be at school.
"They have to be able to glance around and recognise who's there."
He also said teachers might need to react to pupils' facial expressions. He said in raising the issues, he was not expressing an opinion one way or the other.
The hearing was adjourned until Friday. Judgment will be reserved to a later date.