RICHMOND, Va. (AP) - A Virginia school board has filed a federal appeal to defend its transgender bathroom ban.

The Gloucester County School Board's appeal appeared Tuesday on the docket for the 4th U.S. Circuit Court of Appeals in Richmond. Briefs containing legal arguments will come next.

The board has been in a yearslong legal fight over the policy with former student Gavin Grimm, a transgender male.

A U.S. District Court judge ruled last month that the board violated Grimm's rights. The policy required transgender students to use private restrooms or bathrooms that correspond with their biological gender. Grimm had to use girls' restrooms or private bathrooms.

The board said it was protecting students' privacy.

Grimm's 2015 lawsuit was once a federal test case and came to embody the debate about transgender student rights.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.