A federal appeals court ruled Tuesday that a transgender boy in Wisconsin can use his school’s boys’ bathroom, giving the high-school senior a victory just days before his graduation. Ash Whitaker had spent a year embroiled in a legal battle with Kenosha Unified School District No. 1, arguing that the district’s bathroom policy violated his civil liberties by prohibiting him from using facilities that match his gender identity. The school district barred him from using the boys’ bathroom on the grounds that other students’ privacy needed to be protected. A three-judge panel of the U.S. Court of Appeals for the 7th Circuit sided with Whitaker, however, upholding a preliminary ruling that prevents the school district from enforcing its bathroom policy. “The school district has not demonstrated that it will suffer any harm from having to comply with the district court’s preliminary injunction order,” the court concluded. While the decision is unlikely to affect Whitaker’s final days at the school, it marks a major victory for those fighting to give transgender students more rights. Advocates say the ruling is also likely to set a precedent for other appeals courts in the 7th District, which includes Illinois, Indiana, and Wisconsin.