RICHMOND, Va. (Reuters) - A U.S. appeals court on Tuesday ruled for a Virginia transgender student seeking access to the bathroom of his gender identity in a case that could impact the national bathroom wars playing out between gay rights activists and social conservatives.

Slideshow ( 3 images )

The ruling by the U.S. Fourth Circuit Court of Appeals sent back to a lower court a widely watched case weighing protections for transgender students under 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.

After drawing community complaints for allowing Grimm to use the boys’ bathroom for a time, the school district approved a policy in December 2014 requiring students to use single-stall unisex restrooms or restrooms associated with their physical sex.

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

“Today’s decision gives me hope that my fight will help other kids avoid discriminatory treatment at school,” Grimm said in a statement, calling the ruling a relief and vindication.

The superintendent of Gloucester County Public Schools, Walter Clemons, declined to comment.

U.S. President Barack Obama’s administration filed a brief in support of Grimm.

In its ruling, the appellate court noted that federal education officials have interpreted Title IX to extend to transgender students and said the lower court did not appropriately defer to the regulations.

The decision, marking the first time a federal appeals court has found such protections for transgender students under Title IX, could have wide impact.

“The Fourth Circuit decision is truly unprecedented,” said Matt Sharp of the non-profit Alliance Defending Freedom, which advocates for conservative positions on religious liberty.

“Schools are going to be told that you have to allow biological males to share bathrooms and locker rooms and other private facilities with females,” he said in a phone interview.

The court’s jurisdiction includes North Carolina, which recently became the first state in the nation to restrict bathroom access to an individual’s sex at birth.

The Republican governor of North Carolina, Pat McCrory, supported the school district in the Virginia case. He said he would review the ruling. “This is a major, major change in social norms,” he said.