A federal court has overturned an Idaho law that made it impossible for transgender people to change their gender marker on a birth certificate.

The “Idaho Vital Statistics Act” or House Bill 509 was signed into law by Republican Governor Brad Little in March amid the coronavirus pandemic.

The U.S. District Court for Idaho said that the law violated a permanent injunction issued in 2018.

The Idaho Department of Health and Welfare's (IDHW) enforcement of HB 509 “denies transgender individuals a meaningful process for changing the sex listed on their birth certificates to reflect their gender identity,” wrote Judge Candy W. Dale. “This violates the injunction's directive prohibiting IDHW from categorically rejecting applications from transgender people to change the sex listed on their birth certificates and its mandate that IDHW allow such applications.”

Lambda Legal sued Idaho in 2017 over its discriminatory policy and the court granted a permanent injunction the following year. Lawmakers responded with House Bill 509, which Dale described as “directly at odds with the clear intent and mandate” of the court's injunction.

“It is astonishing that the Idaho legislature and Gov. Little plowed forward with resuscitating this dangerous and archaic ban in direct defiance of multiple court orders that repeatedly ordered the government to stop discriminating against transgender people and placing them in harm’s way,” Nora Huppert, a Renberg Fellow and attorney with Lambda Legal, said in a statement. “The court could not have been clearer: What was discriminatory in 2018 remains discriminatory today. Idaho officials may not block transgender people from obtaining identity documents that reflect who they are. This law seeks to deny the very existence of transgender people by stripping them of their identity.”

The ruling is the second win for transgender rights advocates in one week. A separate federal court on Friday ruled in favor of a transgender student who had been denied use of the bathroom of his choice.

(Related: Federal court cites Bostock in siding with transgender student.)