A federal court on Friday cited Bostock v. Clayton County in ruling in favor of a transgender student who had been denied use of the bathroom of his choice.

The U.S. Court of Appeals for the Eleventh Circuit upheld a lower court's ruling that found a Florida school district had wrongfully denied Drew Adams access to the boys' restroom.

Adams, a former student at Allen D. Nease High School in Ponte Vedra, Florida, filed his lawsuit in 2017. He is currently attending the University of Central Florida.

“I am very happy to see justice prevail, after spending almost my entire high school career fighting for equal treatment,” Adams said in a statement. “High school is hard enough without having your school separate you from your peers and mark you as inferior. I hope this decision helps save other transgender students from having to go through that painful and humiliating experience.”

Adams was represented by Lambda Legal.

“Today, the court sent a clear message that schools must treat transgender students with the same dignity and respect as any other student,” Lambda Legal's Tar Borelli said. “The trial court was correct when it ruled that the law requires that Drew Adams be treated like every other boy and be allowed to use the boys' restroom. We are glad the court saw the school board's policy as unjust and discriminatory, and affirmed the inherent dignity of transgender students.”

Earlier this year, the Supreme Court in Bostock found that sex discrimination as it relates to workplace protections applies to sexual orientation and gender identity. The high court's opinion in Bostock expanded the definition of sex in federal laws to include people who identify as LGBT.

(Related: Supreme Court: Federal law protects LGBT workers from discrimination.)

Bostock confirmed that workplace discrimination against transgender people is contrary to law,” the appeals court wrote. “Neither should this discrimination be tolerated in schools. The School Board's bathroom policy, as applied to Mr. Adams, singled him out for different treatment because of his transgender status.”

LGBT activists have called on the Trump administration to implement Bostock.