The legal fight over transgender bathroom rights reached the U.S. Supreme Court for the first time on Wednesday as a Virginia county school board sought to block an order that lets a student who was born a girl but now identifies as male use the boys' bathroom.

Transgender rights have become an increasing divisive issue in the United States, and the use of public bathrooms has been a key part of the controversy.

The Gloucester County School Board filed an emergency application with the Supreme Court in a bid to prevent high school student Gavin Grimm, 17, from using the boys' bathroom when school resumes in September while litigation in the case continues.

RELATED: Thirteen U.S. states ask court to halt transgender bathroom policy

The American Civil Liberties Union sued on behalf of Grimm to challenge the school board's bathroom policy, which requires transgender students to use alternative restroom facilities.

A federal appeals court on Tuesday refused to put on hold a district court's injunction favoring Grimm.

The school board's application was directed to Chief Justice John Roberts, who has responsibility for emergency actions that arise from the regional federal appeals court that covers Virginia. Roberts could act alone or refer the matter to all eight justices. Five votes are need to grant a stay application.

The school board's lawyers said in their court filing that the lower court had given too much deference to President Barack Obama's administration's view that prohibitions on sex discrimination under federal law also apply to gender identity.

For decades "our nation's schools have structured their facilities and programs around the sensible idea that in certain intimate settings men and women may be separated," they added. The lower court decision in favor of Grimm "turns that longstanding expectation upside down," the lawyers wrote.

Some conservative states have sought to require people to use bathrooms that reflect their gender at birth.

The Obama administration issued a directive in May telling public schools to allow transgender students to use bathrooms that correspond to their gender identity or risk losing federal funding. So far, 23 states have sued to block the directive.

RELATED: North Carolina transgender battle could expand civil rights law

Separately, the Justice Department sued North Carolina in May over a state law requiring people to use public bathrooms that correspond to the sex on their birth certificates.

An April ruling by the Richmond, Virginia-based 4th U.S. Circuit Court of Appeals in favor of Grimm was the first by an appeals court to find that transgender students are protected under federal laws that bar sex-based discrimination.