DENVER — A 6-year-old transgender girl will be able to return to school after winning the right to use the girls’ bathroom.

The New York-based Transgender Legal Defense and Education Fund announced the ruling in favor of Coy Mathis on Sunday. Lawyers plan to explain the ruling Monday in Denver.

The group filed the complaint on behalf of Kathryn and Jeremy Mathis claiming that the first-grader had been discriminated against at Eagleside Elementary School in Fountain, near Colorado Springs. Fountain-Fort Carson School District 8 has declined to discuss the case, but Coy’s parents said they were told in December that she had to either use the bathroom in the teachers’ lounge or one in the nurse’s office after the holiday break. The Mathises feared going along with that would stigmatize Coy and open her up to bullying.

She was homeschooled for the rest of the school year as the complaint was considered.

School districts in many states, including Colorado, have enacted policies that allow transgender students to use the bathroom of the gender with which they identify. Sixteen states, including Colorado, have anti-discrimination laws that include protections for transgender people.

The Mathises said Coy, a triplet, showed an early preference for things associated with girls. At 5 months, she took a pink blanket meant for her sister Lily. Later, she showed little interest in toy cars and boy clothes with pictures of sports, monsters and dinosaurs on them. She refused to leave the house if she had to wear boy clothes and became depressed and withdrawn, telling her parents at one point that she wanted to get “fixed” by doctor.

They said they later learned she had gender identity disorder — a condition in which someone identifies as the opposite gender. The Mathises said they decided to help Coy live as a girl and she came out of her shell.