CHICAGO - An Illinois judge on Thursday denied a Chicago-area transgender student’s demand to use the girls’ locker room at a local high school without being restricted to a private changing area inside the locker room.

Cook County Judge Thomas Allen rejected Palatine High School student Nova Maday’s request for a preliminary injunction that would have allowed unrestricted use, according to the American Civil Liberties Union of Illinois, which sued in November on Maday’s behalf.

Nova Maday, 18, a transgender senior at Palatine High School who is suing District 211 for locker room access, poses for a portrait inside an ACLU office on Dec. 3, 2017, in Chicago, Illinois. Armando L. Sanchez / TNS via Getty Images

The case marked the latest legal clash over the use of school bathrooms and facilities by transgender students in the United States, which has sparked battles in North Carolina, Kentucky and elsewhere.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Palatine-Schaumburg High School District 211 requires transgender students to use a private changing area inside the locker rooms of their preferred gender. The judge ruled that a preliminary injunction was not warranted as the case proceeds.

“I am disappointed with the decision today,“ Maday said in a statement. ”All I want is to be accepted by my school for who I am –- a girl –- and be able to take gym and use the locker room to change clothes like the other girls in my class.”

”All I want is to be accepted by my school for who I am –- a girl –- and be able to take gym and use the locker room to change clothes like the other girls in my class.” Nova Maday

Superintendent Daniel Cates said in a statement that the ruling upheld a balance between supporting students and privacy rights.

“We are committed to providing supportive access to our school locker rooms, access that respects and balances the identity and privacy rights of all of the nearly 12,000 teenagers in our high schools,” he said.

“Our practices welcome transgender teens into the locker room of their identity with an agreement that they change or shower in the locker room privacy stalls.”

John Knight, LGBTQ & HIV Project Director of the ACLU of Illinois, said it amounted to discrimination and the group was deciding how to move forward.

The conservative legal groups Alliance Defending Freedom and Thomas More Society, which intervened in the lawsuit, said in a statement the decision ensures student privacy.

“Schools should never be forced to give male students unrestricted access to areas where girls are changing clothes. Claiming a female gender identity doesn’t change that,” Thomas More attorney Thomas Brejcha said.

The issue has played out most prominently in North Carolina, which was mired in controversy and litigation after Republican lawmakers enacted a since-rescinded law in 2016 that restricted bathroom choice in state-run buildings to the sex on people’s birth certificates rather than their gender identity.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM