(CNN) A federal court ruled against a Virginia school district on Tuesday, holding that federal law protects a transgender student who sought to use the boys' bathroom at his school. 
 
 The ruling is a victory for Gavin Grimm -- a transgender male -- who began his legal fight four years ago and has since graduated from the school. The court denied a motion filed by the school district to dismiss Grimm's lawsuit. 
 
 Grimm's lawyers at the American Civil Liberties Union argued that Title IX -- a federal law that prohibits discrimination on the basis of sex in federally funded education programs -- includes discrimination based on gender identity. 
 
 "After full consideration of the facts presented and the compelling scope of relevant legal analyses, the Court concludes that Mr. Grimm has sufficiently pled a Title IX claim of sex discrimination under a gender stereotyping theory," wrote Judge Arenda L. Wright Allen, of the US District Court for the Eastern District of Virginia. 
 
 A federal appeals court based in Chicago issued a similar ruling in a different challenge in May 2017. 
 
 Read More ||||| NORFOLK, Va. (AP) — A federal judge in Virginia has sided with a transgender teen who claims a school board's bathroom policies discriminated against him. 
 
 U.S. District Court Judge Arenda Wright Allen on Tuesday declined the Gloucester County School Board's request to dismiss the case. The judge in Norfolk ordered lawyers for the school board and former student Gavin Grimm to schedule a settlement conference. 
 
 Grimm identifies as male but was barred from using the boys restrooms in high school before graduating in 2017. Grimm sued in 2015, claiming the policy violated his constitutional rights as well as federal protections against sex discrimination. 
 
 He took the case to an appeals court before it was sent back to a lower court last year. In September, the school board argued that the case should be dismissed.
– A federal judge in Virginia has sided with a transgender teen who claims a school board's bathroom policies discriminated against him, the AP reports. US District Court Judge Arenda Wright Allen on Tuesday declined the Gloucester County School Board's request to dismiss the case. Allen found that federal law protects the student, CNN reports. "After full consideration of the facts presented and the compelling scope of relevant legal analyses, the Court concludes that Mr. Grimm has sufficiently pled a Title IX claim of sex discrimination under a gender stereotyping theory," Allen wrote, ordering lawyers for the school board and former student Gavin Grimm to schedule a settlement conference. Grimm identifies as male but was barred from using the boys restrooms in high school before graduating in 2017. Grimm sued in 2015, claiming the policy violated his constitutional rights as well as federal protections against sex discrimination. The Supreme Court last year declined to hear the case and sent it back to a lower court. In September, the school board argued that the case should be dismissed. "I feel an incredible sense of relief," Grimm said in a statement Tuesday. "After fighting this policy since I was 15 years old, I finally have a court decision saying that what the Gloucester County School Board did to me was wrong and it was against the law. I was determined not to give up because I didn't want any other student to have to suffer the same experience that I had to go through."