Jonas Maines, left, and his transgender sister, Nicole Maines, stand outside the Penobscot Judicial Center, Wednesday, June 12, 2013, in Bangor, Maine. The siblings were born as identical twins boys. The state supreme court heard arguments on Wednesday over a school district?s handling of Nicole Maine's restroom needs. The lawsuit accuses the school district of breaking a state law in 2007 when it stopped letting the Maines use the girls bathroom and required to her use a staff bathroom after a student's grandfather complained. (AP Photo/Robert F. Bukaty)

Wayne Maines was in a meeting when he got the call. His daughter, a transgender teenager who had been fighting the state of Maine for years over her right to use the girls' bathroom at school, had finally won.

“I just broke down right then and there,” he said.

In tears, he called his wife, who texted their daughter, Nicole. She was in a school assembly, and immediately ran to the front of the room to announce the victory. “The whole school got up and cheered,” he recounted.

On Thursday, Maine’s Supreme Court made history when it ruled that officials from the public school violated state anti-discrimination law by not allowing Nicole to use the girls' bathroom. It was the first time that a state court has ruled it unlawful to deny transgender students access to the bathroom of the gender with which they identify.

The case stemmed from an incident that occurred when Nicole was in fifth grade. She is now 16 and attends a different school, which is private.

Born a biological male, Nicole was identifying as a female at the age of 2. By the time she was in fifth grade, she had a female name and used the girls' bathroom, with her school’s full support.

But that all changed after a male student followed her into the girls' bathroom on multiple occasions, charging that if she had the right to be in there, so did he. Sensing trouble, the school banned her from using the girls' bathroom. Using the boys' bathroom was out of the question, so she was required to use the faculty bathroom that was isolated from the other students.

"Our daughter just wanted to go to school, be with her girlfriends, get a good education and be accepted by her peers. In other words, Nicole wanted the same things that most other girls her age want," Maines wrote in a blog post for The Huffington Post. "The school acknowledged that it was critical to Nicole's development that she be treated like the girl she has always known herself to be. Instead, she was made an outcast, separated from her peers. She was bullied and harassed simply because she is transgender."

Her family and the Maine Human Rights Commission filed a discrimination lawsuit.

In 2012, a lower court ruled in the school's favor. But last Thursday, Maine's Supreme Court ruled that Nicole's rights were violated under Maine's Human Rights Act.

“A tremendous amount of weight is coming off my shoulders,” Maines told The Huffington Post. "It's still sinking in."

Nicole took to Twitter to respond to the verdict. "Hey y'all, I wanted to let everyone know that after a long struggle (5 years o_O) we finally have received the ruling: WE WON THE CASE!!!!!!!" she wrote. "And thank you so much to everyone who has supported me and my family for the past years! Thank you all so much!"

Transgender activist Janet Mock applauded the decision. "As someone who has navigated the same spaces as Nicole and other trans students, I understand intimately what it means to be able to have equal access to facilities my peers had access to," she said. "To walk into gender-segregated spaces and be affirmed in your identity is a visible step of equality, access and affirmation."

Jennifer Levi, director of GLAD's Transgender Rights Project, who argued the case in court, called the decision momentous.

“It sends a message to transgender students that their lives are valuable, that their education needs are important, and that schools have to provide them with equal educational opportunities,” Levi said. “No court in the country before has ever allowed a transgender person access to the bathroom based on the existence of a non-discrimination law.”

The lawyer defending the school district also praised the ruling.

She said the district would take every step to comply with the law, and said the court "provided helpful guidance about how to handle this issue that is becoming more and more common in schools around the state and the country."

The landmark ruling is reverberating across the country as many schools struggle to develop policies for transgender students.

"This sends a strong message to schools that transgender students have to be treated just like other students," said Michael D. Silverman, executive director of the Transgender Legal Defense & Education Fund.

He noted that schools are in a special position to teach children about tolerance and respect. “We’ve seen tremendous willingness in many school districts to address the challenges that their transgender students face," he said. "By ensuring that their transgender students are treated equally, they can make the most of that opportunity."

Massachusetts, Connecticut, Washington and Colorado all have policies protecting transgender students' rights, and in 2013, California passed a law allowing transgender students to use the bathroom of the gender with which they identify.

But in many states, there is a burgeoning backlash.

In California, a conservative group has mounted an effort to repeal the new law. In Utah, a state legislator filed a bill that would only allow students to use bathrooms matching their biological “male or female phenotype.” "We are just trying to make sure people are comfortable," state Rep. Mike Kennedy, the Republican who introduced the bill, told a local newspaper.

Zachary Heiden, legal director of ACLU Maine, said he has witnessed attempts to deny transgender rights spring up all over the country.

"They grow out of this fear of the unknown, and a fear of transgender people,” he said.

In Nicole's case, he explained, the court ruled that fear was not a good enough reason to discriminate. "The law protects everyone, even and especially when it’s politically controversial,” he said. “People who are transgender are not dangerous, and people who are transgender need to go to the bathroom.”

Heiden said he expects the ruling, which he called “elegant and straightforward,” to influence litigation nationwide.

“The heart of this ruling is the recognition that this is a case about a girl. She knows she’s a girl. Her parents know she’s a girl. The school recognizes she’s a girl,” he said. “The court said, you can’t discriminate against a girl just because she’s a transgender girl. That in itself is incredibly important and will hopefully be a precedent that will guide other courts across the country.”

For Wayne Maines, he's just happy that his daughter can get back to being a normal kid.