A federal judge in Baltimore has sided with a transgender teen challenging his school's policy of forcing him to use a separate locker room.

Max Brennan, a 15-year-old student at St. Michaels Middle High School, was not allowed to use the boys' locker room to dress for gym class. Instead, Brennan was forced to use a separate, gender-neutral restroom, The Washington Post reported.

U.S. District Judge George L. Russell III ruled that the school's policy singles out Brennan for discrimination and “harms his health and well-being.” Russell is the first judge in Maryland to find that federal law protects transgender students' right to use the bathroom and locker room of their choice.

The opinion allows Brennan's lawsuit to move forward. Because Brennan is not enrolled in gym class for the current school year, Russell is allowing the case to move forward without blocking the school's policy.

Brennan is represented by Jennifer Kent, an attorney with FreeState Justice.

“School systems in Maryland should know the law and should be protecting students who are transgender from discrimination, not singling them out for separate and unequal treatment,” Kent said.