Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The U.S. Supreme Court agreed Wednesday to put on hold a federal judge's order in the growing controversy over restrictions on the use of bathrooms by transgender students.

The school board in Gloucester County, Virginia, is challenging a decision by a federal appeals court that ruled it must allow a student, who was born a girl but now identifies as male, to use the boys' bathroom during the coming school year.

While the board prepares to appeal the decision, it asked the Supreme Court to block the lower court order. And on Wednesday, the justices granted that request in a brief order.

Related: Va. Appeals Court Won't Re-Hear Transgender Bathroom Access Case

Justices Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan dissented and said they would not have put the ruling on hold.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Gavin Grimm in August last year. Steve Helber / AP

Wednesday's order means the student, Gavin Grimm, will not be able to use the restroom of his choice when school starts.

In the first such decision of its kind, the 4th Circuit Court of Appeals ruled in April that refusing to allow students to use bathrooms corresponding to their gender identity would violate a federal law known as Title IX that bans sex discrimination by schools receiving federal funds.

The ruling cited an Education Department letter that said "a school generally must treat transgender students consistent with their gender identity." The appeals court found that to be a reasonable interpretation of Title IX.

That ruling was a victory for Grimm, a 17-year-old high school student in rural Virginia near the Chesapeake Bay, Grimm, who was born female but identifies as male, has undergone hormone therapy and has legally changed his name.

Related: Appeals court hears trans student’s challenge to school’s bathroom policy

The Obama administration has cited the ruling in its transgender lawsuit against North Carolina and in a letter to advising the nation's schools on transgender policy.

In urging the Supreme Court to block the effect of the ruling, the school board said it was based on a single Education Department letter that did not have the legal force of a full-blown regulation. And it argued that the rights of parents were put in jeopardy.

"Depriving parents of any say over whether their children should be exposed to members of the opposite biological sex, possibly in a state of full or complete undress in intimate settings, deprives them of their right to direct the education and upbringing of their children," the board's lawyers said.

Related: 11 States Sue Obama Administration Over Transgender Bathroom Directive

But lawyers for Grimm said the appeals court order "does not apply to locker rooms, showers or other situations in which students may be in a state of full or complete undress, and it certainly does not extend to every school district in the Fourth Circuit or the entire Nation."

The school district would suffer no permanent harm, they said, if Grimm is allowed to use the boys' restroom while the Supreme Court considers whether to take up the larger issue.

The school board has said it will ask the Supreme Court in late August to overturn the lower court decision. The court will not act on that request until October at the earliest.