PORTLAND, Maine (AP) — School officials violated state anti-discrimination law when they would not allow a transgender fifth-grader to use the girls' bathroom, according to a ruling by the highest court in Maine that's believed to be the first of its kind.

The family of student Nicole Maines and the Maine Human Rights Commission sued in 2009 after school officials required her to use a staff, not student, restroom.

"This is a momentous decision that marks a huge breakthrough for transgender young people," said Jennifer Levi, director of the Boston-based Gay & Lesbian Advocates & Defenders' Transgender Rights Project after the Maine Supreme Judicial Court's ruling on Thursday.

The court concluded that the Orono school district's actions violated the Maine Human Rights Act, which bans discrimination based on sexual orientation or gender identity, overturning a lower court's ruling that the district acted within its discretion.

The ruling is the first time a state high court concluded that a transgender person should use the bathroom of the gender with which they identify, according to GLAD. Federal courts haven't taken up the issue.

Students at the southern Maine high school Nicole now attends stood up and cheered when news of the ruling was announced, said her father, Wayne Maines.

School administrators across the country are grappling with the issue.

Colorado officials said last year that a suburban Colorado Springs school district discriminated against a 6-year-old transgender girl by preventing her from using the girls' bathroom.

In California, there's an effort afoot to try to repeal a law that allows public school students to use bathrooms and locker rooms that correspond with their expressed genders.

In the Maine case, Nicole Maines was using the girls' bathroom in her elementary school until the grandfather of a fifth-grade boy complained to administrators. The Orono school district determined that she should use a staff bathroom, but her parents said that amounted to discrimination.

Story continues

Nicole is a biological male who identified as a girl beginning at age 2.

Nicole, who's now 16, said after arguments before the high court last summer that she hoped the justices understood the importance of going to school, getting an education and making friends without having to be "bullied" by other students — or school administrators.

Nicole's father said all he had ever wanted was for his daughter to be treated just like her classmates. He said he was overcome with emotion when he learned of the decision.

"It sends a message to my kids that you can believe in the system and that it can work," Wayne Maines said. "I'm just going to hug my kids and enjoy the moment, and do some healing."

Melissa Hewey, lawyer for the school district, said the ruling provided clarity not just to Orono, but to schools around the state.

"The court has now clarified what has been a difficult issue and is more and more common in schools, and the Orono School Department is going to do what it needs to do to comply with the law," she said.

In the 5-1 ruling, the court had to reconcile two separate state laws, one requiring separate bathrooms based on gender and the other prohibiting discrimination based on sexual orientation.

In this case, in which the child had a formal diagnosis of gender dysphoria, "it has been clearly established that a student's psychological well-being and educational success depend upon being permitted to use the communal bathroom consistent with her gender identity," Justice Warren Silver wrote.

The Supreme Judicial Court pointed out that its ruling was based on the circumstances of the case in which there was ample documentation of the student's gender identity. "Our opinion must not be read to require schools to permit students casual access to any bathroom of their choice," he wrote.

___

Follow David Sharp on Twitter at https://twitter.com/David_Sharp_AP