The Supreme Court will take up transgender rights for the first time in the case of a Virginia school board that wants to prevent a transgender teenager from using the boys' bathroom at his high school.

The justices said Friday they will hear the appeal from the Gloucester County school board sometime next year. The high court's order means that student Gavin Grimm will not be able to use the boys' bathroom in the meantime.

A lower court had ordered the school board to accommodate Grimm, but the justices in August put that order on hold while they considered whether to hear the appeal.

Grimm, a 17-year-old high school senior, was born female but identifies as male. He was allowed to use the boys' restroom at his high school for several weeks in 2014. But after some parents complained, the school board adopted a policy requiring students to use either the restroom that corresponds with their biological gender or a private, single-stall restroom. Grimm is backed by the Obama administration in his argument that the policy violates Title IX, a federal law that bars sex discrimination in schools.

"I never thought that my restroom use would ever turn into any kind of national debate," Grimm said in a statement issued after the court announced it will hear his case. "The only thing I ever asked for was the right to be treated like everyone else. While I'm disappointed that I will have to spend my final school year being singled out and treated differently from every other guy, I will do everything I can to make sure that other transgender students don't have to go through the same experience."

The Education Department says transgender students should be allowed to use restrooms and locker rooms consistent with their gender identities. Among the issues in the case is whether the department's guidance should have the force of law.

Similar lawsuits are pending around the country. The Obama administration has sued North Carolina over a state law aimed at restricting transgender students to bathrooms that correspond to their biological genders.

A federal judge in Texas has sided with Texas and 12 other states in issuing a nationwide hold on the administration's directive to public schools, issued in May. The directive tells schools to allow transgender students to use the bathroom and locker room consistent with their gender identity.

The case probably will be heard in the winter, and it is by no means certain that there will be a ninth justice to fill the seat left vacant by the death of Justice Antonin Scalia in February. Senate Republicans have refused to act on Judge Merrick Garland's nomination to the high court. A tie vote would be a victory for Grimm, who won in the lower courts, but would leave the issue unresolved nationally.

The Supreme Court split 5 to 3 in August to put the court order in Grimm's case on hold. At the time, Justice Stephen Breyer said he was providing a fifth vote to go along with the four more conservative justices to "preserve the status quo" until the court decided whether to weigh in. Justices Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan dissented.

Grimm had urged the court not to take up his case.

The school board asked the court to settle the matter now. It said that allowing Grimm to use the boys restroom raises privacy concerns and may cause some parents to pull their children out of school.

The 4th U.S. Circuit Court of Appeals in Richmond sided with Grimm in April, saying the federal judge who previously dismissed Grimm's Title IX discrimination claim ignored the Education Department's guidance on bathroom use.

The appeals court reinstated Grimm's Title IX claim and sent it back to the district court for further consideration. The judge then issued the order in favor of Grimm.