The federal court of appeals has destroyed a school’s reasons for keeping a transgender child from using his bathroom of choice.

The opinion, issued by the US Court of Appeals for the Seventh Circuit, told Kenosha Unified School District in Wisconsin that it had negatively affected student Ash Whitaker, 17, with its policy.

If the school appeals, the case could go to the Supreme Court, with Ash replacing Gavin Grimm as the preeminent case defending trans kids’ right to use the facilities they choose.

Authorities argued that Ash’s use of the boys’ bathroom infringed on “the privacy rights of all 22,160 students” in the district, according to ThinkProgress.

The court tore this reasoning apart, saying it was “based upon sheer conjecture and abstraction.”

The district had ignored “the practical reality of how Ash, as a transgender boy, uses the bathroom: by entering a stall and closing the door,” the court added.

In July, 17-year-old Ash brought a lawsuit against the district after it forced him to stop using the boys’ bathroom despite six months of him doing so without incident previously.

The lawsuit also stated that teachers have continued to misgender Ash and call him by his female birth name, and that they stopped him from running for prom king until his classmates protested.

Ash, who will start studying Biomedical Engineering at the University of Wisconsin-Madison later this year, began identifying as a boy during his freshman year in high school, according to the lawsuit.

An injunction has allowed Ash to use the boys’ toilets during his last year in school, while the lawsuit continues to move through the courts.

A federal judge ruled in Ash’s favour in September, but the district appealed, leading to yesterday’s opinion.

The district had received just a single complaint – from a parent, not a student – on the issue, the court heard.

In its opinion, the court said that “a transgender student’s presence in the restroom provides no more of a risk to other students’ privacy rights than the presence of an overly curious student of the same biological sex who decides to sneak glances at his or her classmates performing their bodily functions.

“Or for that matter, any other student who uses the bathroom at the same time,” the court continued.

“Common sense tells us that the communal restroom is a place where individuals act in a discreet manner to protect their privacy and those who have true privacy concerns are able to utilise a stall.”

The district said Ash’s struggles were “self-inflicted” because he didn’t make use of the separate bathroom provided to him – on the other side of the building from his classes.

As well as segregating him, the court also said that this policy had exacerbated his vasovagal syncope, a condition which leads Ash to experience symptoms like fainting and seizures when dehydrated.

This was because Ash had avoided drinking water to stop needing to use the bathroom, because of all the anxiety he was getting from the extra attention given to him by other students.

The court wrote that the 17-year-old was thus faced with “the unenviable choice between using a bathroom that would further stigmatise him and cause him to miss class time, or avoid use of the bathroom altogether at the expense of his health.”

His school violated Title IX – which provides protections from discrimination based on sex – the court said, by not accommodating Ash’s gender identity.

It also speculated that the school may have broken the Constitution’s Equal Protection Clause, which says that states should not deny people “the equal protection of the laws”.