A U.S. appeals court on Tuesday ruled for a Virginia transgender student seeking access to the bathroom of his gender identity.

The ruling by the U.S. Fourth Circuit Court of Appeals sent back to a lower court the widely watched case that considered whether transgender students are protected by the 1972 Title IX Act, which prohibits sex-based discrimination by schools receiving federal funding.

Student Gavin Grimm was barred from using the boys’ bathroom at his local high school in Gloucester County, Virginia. Grimm was born a female but identifies as a male.

RELATED: Pearl Jam, Boston cancel North Carolina concerts over transgender law

The appellate court reversed a district court’s dismissal of a Title IX claim by the student and said he could proceed with his lawsuit, which contends that the school board’s decision was discriminatory.

The appeals court said in its ruling that the district court “did not accord proper deference to the Department of Education’s regulations.”

The case was remanded to the district court to be reheard.

The decision marked the first time a federal appeals court has found Title IX rights protect transgender students, the ACLU said in a statement. It could impact other states where similar cases have arisen.