A court in Maine has ordered the Orono School District to pay $75,000 to a homosexual advocacy group and allow self-identified “transgender” students to use the bathrooms of the opposite sex, ending a nearly seven-year legal battle that began after school officials tried to safely accommodate a boy living as a girl who was bullied in the girls’ restroom.

Wyatt Maines, now 17, began living as a girl in 3rd grade with the apparent blessing of the Orono School District, which allowed him to go by the name “Nicole” and use facilities meant for females even though he is biologically male. (He has since made the name change legal.) But after a bullying incident in the girls’ bathroom at Asa Adams Elementary School led the district to walk back its liberal policy for Maines’ own protection, requiring him to use single-stall restrooms normally reserved for staff and assigning him a between-class adult minder to ensure his safety, he sued the school district with the help of his family and the Boston-based Gay & Lesbian Advocates & Defenders (GLAD) legal group.

Maines and his attorneys said that by singling him out for added protection, the district brought him unwanted attention and made him feel like an outsider at the school.

“An adult would stand 15 feet away from me wherever I went,” Maines told the Bangor Daily News. “When I would go to the bathroom, they would follow me. When I would go to the lunchroom, they’d follow me. It was like I had an invisible string attached to me and they were on the other end. It was ridiculous.”

But Orono School District attorney Melissa Hewey said the extra supervision was provided at the request of Maines’ parents, Kelly and Wayne Maines.

“The family was concerned about how things would go,” Hewey told the Daily News. “They basically said, ‘Can we have someone keep an eye on her [sic] at those unstructured times between classes?’ This is something the family asked for.”

The case has bounced around from court to court over the past several years, with some judges ruling in favor of the school district and others ruling in favor of Maines. It was originally brought anonymously, using the names John, Jane and Susan Doe as pseudonyms for Wayne, Kelly and “Nicole” Maines. (Not named in the lawsuit is Jonas Maines, “Nicole’s” identical twin brother.) However, Maines’ family has publicly come out to claim responsibility for the lawsuit, which they continued to pursue long after the family moved away from the Orono School District and started a new life.

Now, it seems the family’s perseverance has paid off, as the Penobscot County Superior Court has ruled that “the process employed by the Orono School Department to deny access by Susan Doe to the girls’ restroom at the Asa Adams School and the Orono Middle School were in violation [of state law forbidding discrimination based on sexual preference]” and decreed that the district must provide “access by transgender students to school restrooms that are consistent with their gender identity.”

The court also ordered the district to pay $75,000 to GLAD, most of which the organization says will be given directly to the Maines family.

The lawsuit has made the Maines family heroes to the homosexual and transgender activist community. The family has been honored by the ACLU, GLAD, and Glamour magazine for their unrelenting determination to force their former school district to normalize transgender behaviors.

But not everyone in the family has always been enthusiastic about Wyatt’s transformation into “Nicole.” Wayne Maines admits that when his wife, Kelly, sought out the advice of Dr. Norman Spack – founder of a controversial gender identity clinic that recommends hormonal treatments for children as young as 8 or 9 – in response to Wyatt’s affinity for feminine clothing and toys and disturbing declaration that he “hated” his penis and wanted to “get rid of it,” he followed her lead, all the while hoping it was just a phase.

“I wasn’t always on board,’’ Wayne told the Boston Globe in a 2011 profile on the family. “Kelly and I were not on the same page. My question was, what is this doctor doing? It scared me. I was grieving. I was losing my son.’’

But Wayne added, “I have to tell you, Kelly’s the leader in our family. Both she and Nicole are extremely strong-willed, and I went with the flow.’’

Spack was adamant that the earlier Wyatt could begin his “transition,” the better the outcome would be. “Most of us look pretty similar until we hit puberty,’’ Spack told the Globe. “I bet I could go to any fourth or fifth-grade class, cut the hair of the boys, put earrings on various kids, change their clothing, and we could send all those kids off to the opposite-gender bathrooms and nobody would say boo.’’

“We can do wonders if we can get them early,” Spack added.

So Wyatt grew his hair out, began dressing like a girl, and went back to school for 4th grade using the names “Nicole” and “Nikki.”

But the first time Wyatt was bullied in the girls’ restroom, the ramifications of the decision began to sink in. “It was like a switch had been turned on, saying it is now OK to question [Wyatt’s] choice to be transgender,” Wayne told the Globe. “Every day she [sic] was reminded that she [sic] was different, and the other kids picked up on it.”

The decision took its toll on Jonas, too. As the twins entered middle school, Jonas began getting into fights as his twin brother transitioned into his twin “sister.”

“He’s taken on a lot,’’ Wayne said of Jonas. “Middle school boys and sexuality, you know . . . boys can get picked on.’’

Ultimately, Kelly decided to move herself and both children to a city closer to Boston – where “Nicole” was receiving hormone treatments – and start the kids at a new school in “stealth” mode, not revealing to anyone but school administrators that “Nicole” had been born Wyatt. But Wayne opted to keep his job at the University of Maine, meaning that he stays in Orono during the week and sees his family only on weekends.

As for the outcome of the court case, Wayne told the Daily News, “I’m just glad it’s over.”

But Carisa Cunningham of GLAD said she’s hopeful the decision will lead to an expansion of acceptance of cross-gender behavior nationwide.

“This is an important decision in that it sets a precedent and that is a building block for similar cases nationally,” Cunningham said.

The decision is believed to be the first of its kind in the United States.