GLOUCESTER Va. (WAVY) — A federal court ruled Friday that the Gloucester County School Board’s policies were discriminatory toward former transgender student Gavin Grimm while he attended Gloucester High School.

The court ruled the board’s policies violated Grimm’s rights under both the Fourteenth Amendment of the U.S. Constitution and Title IX of the Education Amendments of 1972 when it stopped him from using the boys restroom at the high school.

RELATED: Virginia school’s transgender bathroom ban is back in court

It also said the school board was wrong to not update his official school transcript to match the “male” designation on his birth certificate, and issued a permanent injunction to change Grimm’s school records to “male.” The court is also requiring the school board to pay for Grimm’s attorneys fees in the case.

“This Court is compelled to acknowledge too that some of the external challenges seeking to reroute these new paths inflicted grief, pain, and suicidal thoughts on a child,” the court’s conclusion said in part. “However well-intentioned some external challenges may have been and however sincere worries were about possible unknown consequences arising from a new school restroom protocol, the perpetuation of harm to a child stemming from unconstitutional conduct cannot be allowed to stand. These acknowledgements are made in the hopes of making a positive difference to Mr. Grimm and to the everyday lives of our children who rely upon us to protect them compassionately and in ways that more perfectly respect the dignity of every person.”

Grimm, now 20, transitioned to a boy at the start of his sophomore year. He filed the lawsuit back in 2015 and had been fighting the case ever since.

This is a breaking story and will be updated.