The trial over a North Carolina law governing transgender restroom access is being pushed back by several months, an attorney for residents challenging the law said Friday.

U.S. Magistrate Judge Joi Elizabeth Peake partly granted a request to delay the North Carolina proceedings while the U.S. Supreme Court considers whether to hear a Virginia case on transgender restroom access, according to a brief entry in the federal court docket.

James Esseks, an ACLU lawyer on the team representing three transgender residents, said the judge's order means the case will be pushed back from its November trial date until May.

The so-called HB2 law requires transgender people to use public restrooms that correspond with the sex on their birth certificate, not their gender identity. It also limits other antidiscrimination protections for LGBT people.

The ACLU and the U.S. Justice Department are challenging the law, while North Carolina's Republican governor and legislative leaders are defending it.

The Republican leaders had asked the court to halt the proceedings while the Supreme Court decides if it will take the Virginia case, which centers around a transgender high school student who is asking officials to allow him to use a male restroom.

Meanwhile, the transgender plaintiffs in North Carolina received a favorable ruling when a judge ruled that they must be allowed to use restrooms conforming to their gender identity. They have asked an appeals court to expand that ruling to all transgender people in the state, not just those involved in the lawsuit.

Esseks said the ACLU got behind the request for a delay because it wants to give the 4th Circuit Court of Appeals time to consider that request.