A Florida school district was wrong when it forced a transgender high school student to either use the girls bathroom or a single-stall gender neutral bathroom, a federal appeals court ruled.

The ruling issued Friday sides with Drew Adams, who sued the St. Johns County School District because he wasn’t allowed to use the boys restroom. It could have a wide-ranging impact on how schools treat transgender students. Though his assigned gender was female at birth, Adams began the transition to become a male before he enrolled in Allen D. Nease High School in Ponte Vedra Beach.