The Supreme Court on Monday declined to hear a legal battle over the rights of transgender students, handing a victory to Gavin Grimm over the Virginia school board that denied him the right to use the boys’ restroom.

As is its custom, the court did not say why it was rejecting the appeal of the Gloucester County school district. Justices Clarence Thomas and Samuel A. Alito Jr. said they would have accepted the case.

The court’s decision not to take up the case does not establish a national precedent, nor does it necessarily signal agreement with the lower court that sided with Grimm.

But gay- and transgender-rights activists cheered the high court’s decision to stay out of the long-running dispute. It let stand a decision by the U.S. Court of Appeals for the 4th Circuit that was a resounding victory for Grimm, who has become a well-known figure in the transgender-rights movement.

The Equality Act is a positive step forward for the LGBTQ community. But it came with swift backlash from conservative lawmakers. (Monica Rodman, Sarah Hashemi/The Washington Post)

“I am glad that my years-long fight to have my school see me for who I am is over,” Grimm said in a statement, adding, “Trans youth deserve to use the bathroom in peace without being humiliated and stigmatized by their own school boards and elected officials.”

The school district declined to comment.

In a 2-to-1 decision last August, a panel of the appeals court said the school board had discriminated on the basis of sex and violated the 14th Amendment by prohibiting Grimm from using the bathroom that aligned with his gender identity. His high school offered a single-stall restroom as an alternative.

Judge Henry F. Floyd wrote that the 4th Circuit, which covers Virginia, Maryland, West Virginia and the Carolinas, was joining “a growing consensus of courts” finding that the Constitution and federal law protect transgender students “from school bathroom policies that prohibit them from affirming their gender.”

Floyd framed the case in historical terms.

“The proudest moments of the federal judiciary have been when we affirm the burgeoning values of our bright youth, rather than preserve the prejudices of the past,” Floyd wrote. “How shallow a promise of equal protection that would not protect Grimm from the fantastical fears and unfounded prejudices of his adult community. It is time to move forward.”

Floyd’s ruling relied in part on the Supreme Court’s landmark victory for gay and transgender workers last June, which said a federal law forbidding discrimination protects sexual orientation and gender identity.

In the majority opinion in Bostock v. Clayton County, Justice Neil M. Gorsuch was careful to say it did not “purport to address bathrooms, locker rooms, or anything else of the kind.”

But the reasoning in the decision has been applied by lower courts affirming transgender students’ access to restrooms that match their gender identity.

The Supreme Court often lets such issues percolate in lower courts before weighing in, and a direct split among the regional appeals courts is often what prompts the justices to enter the debate.

But a panel of the U.S. Court of Appeals for the 11th Circuit decided a similar case in favor of a Florida student suing a school district there. The school district has a pending request that the entire circuit review that ruling.

And there are related legal battles around the country that might reach the Supreme Court, involving state laws restricting transgender students’ participation in sports, and laws involving medical treatments for younger transgender individuals.

Grimm’s lawyer, Joshua Block of the American Civil Liberties Union, said the Supreme Court’s decision not to review the 4th Circuit was “an incredible victory for Gavin and transgender students around the country.”

Although the Supreme Court was not affirming the decision, Block noted that the justices in 2016 had granted a stay so that the school board did not have to comply with a lower court’s ruling in favor of Grimm.

He said in the time since then, transgender rights have become more accepted and restroom access has become less of an issue. “They saw the sky didn’t fall,” Block said.

Grimm, now a 22-year-old living in the Hampton Roads area of Virginia, said in an interview that he was tending to a sick cat when Block texted him with the news from the Supreme Court.

“Wow!” Grimm texted back. He said he felt a mixture of “pride and love and joy.”

“It brought a feeling of jubilation, a feeling of togetherness immediately within my community,” Grimm said. “I didn’t just feel the win for me, I felt the win for all of the transgender students and transgender people across the nation.”

The controversy began in 2014, when Grimm was a high school sophomore and the school allowed him to use the boys’ restroom.

But parent backlash prompted the school board to reverse course and require Grimm to use a restroom reserved just for him.

“Being forced to use the nurse’s room, a private bathroom, and the girl’s room was humiliating for me, and having to go to out-of-the-way bathrooms severely interfered with my education,” Grimm said Monday in his prepared statement, which was provided by the ACLU.

Grimm, supported by the Obama administration, sued and won at the district court and the 4th Circuit. The Supreme Court agreed then to take the case.

But when Donald Trump won the presidency, his administration changed the federal government’s position on the issue. The justices sent Grimm’s case back to lower courts in light of the change.

After the 4th Circuit’s most recent decision, President Biden was elected, and that signaled another change.

Whatever happens next, Grimm’s battle appears to have ended.

While transgender legal battles are being waged across the country, Virginia has become central to some LGBTQ issues.

There was a string of victories in 2020.

Gov. Ralph Northam (D) signed into law a bill banning conversion therapy. Days later, he signed into law another measure requiring the state’s Education Department to publish rules regulating the treatment of transgender students in public elementary, middle and high schools. The new rules, which took effect March 6, require that school officials let children use facilities and join gender-specific programs that match their gender identities, as well as requiring teachers to address transgender children by their names and pronouns.

But backlash is building: In late March, two conservative groups sued the Virginia Department of Education to block implementation of the transgender guidelines. And a teacher in Loudoun County Public Schools is suing the Northern Virginia district after he was placed on paid administrative leave for refusing to use transgender children’s pronouns, citing his Christian faith.

A judge recently ordered the school system to reinstate the teacher as his suit continues through the courts.

Ann E. Marimow contributed to this report.