RICHMOND, Va. — 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.

RELATED: Federal court sides with Gavin Grimm over Gloucester in transgender bathroom fight

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.

RELATED: Virginia school board will keep defending transgender policy