Boys at a County Antrim grammar school embroiled in a row over hair length are the victims of sexual discrimination, it has been claimed.
Grant Stranaghan's locks resulted in him being suspended
A barrister showed the High Court in Belfast a photograph of prefects at Ballyclare High School with nearly 30 girls "breaking rules on appearance".
"This is one of the clearest instances of direct discrimination this court is likely to see," he said.
The school is seeking a declaration that its uniform policies are legal.
The move comes after it suspended one 16-year-old boy for refusing to cut his hair.
On the second day of the judicial review hearing, a barrister, appearing for a second boy given detention on the same grounds, urged the court to find the policies were unlawful.
The lawyer claimed boys received less favourable treatment through being denied choice over hairstyles, and that enforcement of the policies differed between the sexes.
According to the school's rules on uniform and dress code girls with long hair have to tie it back. They are also forbidden from extreme styles and colours.
Boys, meanwhile, are not allowed to have hair touching blazer collars or severe number-one cuts.
As he opened his response, however, the barrister produced a photograph of prefects from the school's 2005/06 magazine.
He said: "What one sees is a number of boys and girls. The boys in the prefects' picture are all in compliance with the school's policy, they appear to have hair cuts in keeping with the policy.
"The girls, on the other hand, have a variety of hairstyles. On a quick count I see 30 female pupils in the image, and of those 27 are in breach of the school rules.
"They do not have their hair tied back neatly with a clip or ribbon. There may be three female pupils who are in compliance."
The hearing continues.