The ruling is a victory for the school board and a loss -- for now -- for Gavin Grimm, the student who won at the lower court level.
Justices Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan would have left the lower court decision undisturbed. It took five justices to act, and Justice Stephen Breyer wrote separately to say that he concurred in the decision in part because granting the stay would "preserve the status quo" until the court has a chance to consider a petition for cert. "I vote to grant the application as a courtesy," Breyer wrote.
"The order comes as something of a surprise given the current composition of the court," said Steve Vladeck, CNN contributor and professor of law at the University of Texas School of Law.
"In the short term, this means the relationship between transgender identity and sex discrimination will be left in limbo until the Supreme Court resolves it one way or the other. But given that Justice Breyer's vote was only a courtesy, it's hard to see the court being able to settle this matter until a ninth justice is appointed," Vladeck said.
The case comes as the issue of transgender policies have caused controversy across the country. Most notably, the Department of Justice is suing North Carolina over its law concerning transgender bathrooms. On Monday, a federal court heard a separate challenge to the law from the American Civil Liberties Union and other groups.
In court papers in the Virginia case, lawyers for the Gloucester County School Board asked the court to preserve the status quo and allow the school's policy to remain in effect once the school year commenced, while they asked the Supreme Court to take up an appeal of the lower court ruling.
The school board said the policy was meant in part to protect the "basic expectations of bodily privacy of Gloucester County students." It stressed that in September, when the school year commences, Grimm would have access to three single-user restrooms as well as a restroom in the nurse's office.
Grimm's lawyers say the policy violates an anti-discrimination law and told the court that it should allow the lower court order to remain in place.
"No irreparable harm will occur" said Joshua Block, an ACLU lawyer, if Grimm "is allowed to use the boys' restroom while this court considers whether to grant certiorari."
Block said that Grimm "is a boy and lives accordingly in all aspects of his life" but that "the sex assigned to him at birth was female."
Grimm was originally allowed to use the boys' restroom, but after complaints from some parents, the school administered a new policy restricting restrooms to students based on their biological gender.
His lawyers say that the policy violates Title IX, a federal law banning sex discrimination in schools. They say the law protects the rights of transgender students to use restrooms consistent with their gender identity.
"Banishing transgender students from the restrooms used by their peers unquestionably interferes with their equal educational opportunity under Title IX," Block argued.
Block later said the court's ruling would mean Grimm will be "stigmatized" for the upcoming school year.
"We are disappointed that the court has issued a stay and that Gavin will have to begin another school year isolated from his peers and stigmatized by the Gloucester County school board just because he's a boy who is transgender," Block said in a statement. "We remain hopeful that Gavin will ultimately prevail."
The National Center for Lesbian Rights, meanwhile, called Wednesday's ruling "disappointing"
but were encouraged that it was temporary.
"Especially in light of Justice Breyer's statement that his vote for a stay was a mere 'courtesy' to preserve the status quo while the court considers whether to review the decision, this should not be taken as any sign of where a majority of the court is leaning on the substantive question of whether Title IX protects transgender students," the group said in a statement.
The Gloucester County School Board issued a brief statement welcoming the court's decision.
"The school board welcomes the Supreme Court's decision as the new school year approaches. The board continues to believe that its resolution of this complex matter fully considered the interests of all students and parents in the Gloucester County school system," the statement said.