An Illinois school district discriminated against a transgender student when it created a special set of rules restricting her use of the girls’ locker room, the US Department of Education determined on Monday.

“The Department of Education’s decision makes clear that what my school did was wrong,” the student, whose identity has not been made public, said in a statement through the American Civil Liberties Union. “I hope no other student, anywhere, is forced to confront this indignity. It is a good day for all students, but especially those who are transgender.”

Civil rights advocates are hailing the decision as the first of its kind. The ruling stems from a 2013 complaint brought on behalf of the student by attorneys with the ACLU. The student, who was assigned male at birth and identifies as female, uses the girls’ bathroom and plays on girls’ sports teams but was only permitted to use the girls’ locker room if she changed behind a curtain. The student has said she may continue to use the curtain, but argued that it should be her choice and not compulsory.

Township high school district 211 laid the groundwork for Monday’s ruling in mid-October when it defied a warning from the Education Department’s Office of Civil Rights that the school could face enforcement for violating anti-discrimination laws. Most schools, upon receiving such a warning, collaborate with regulators to reform their policies. The school district in Palatine, despite some discussion with the department, announced that it would not give the student full access to the locker room.

The Palatine, Illinois, school district now has one month to comply with the ruling or face the loss of its Title IX funding. Last year, the district received $6m in federal money.

In a statement, the district said: “We do not agree with the decision and remain strong in our belief that the District’s course of action, including private changing stations in our locker rooms, appropriately serves the dignity and privacy of all students in our educational environment.”