In a ruling issued Monday, U.S. Magistrate Judge Candy Dale said the rules by the Idaho Department of Health and Welfare violated the Equal Protection Clause of the U.S. Constitution, served no rational government purpose and put transgender people at risk by forcing them to disclose their status when they present identification documents.

"A rule providing an avenue to obtain a birth certificate with a listed sex that aligns with an individual's gender identity promotes the health, well-being, and safety of transgender people without impacting the rights of others," Dale wrote.

Dale gave Idaho until April 6 to begin considering applications to change the sex listed on birth certificates under new, constitutionally sound rules. The ruling also says reissued birth certificates can't include a record of the gender having been changed.

Most states already allow such changes. But Idaho was one of four - including Kansas, Ohio and Tennessee - that prohibited transgender people from changing their birth certificates to reflect their gender identity.

The ruling was a response to a lawsuit brought by two transgender women last year who said they faced hostility and harassment at places like grocery stores and government offices because they had to present identification that did not reflect their gender identity.

One of the women, identified only as F.V. in the lawsuit, said looks forward to being one of the first people to update her birth certificate in Idaho.

"I am thrilled and proud that my own state will be updating their policies, even though it required a court order to do so," said F.V. in a prepared statement issued by Lambda Legal, the law firm that represented her in the case.

In the court ruling, Dale noted the difference between biological sex and gender: The scientific consensus is that biological sex is determined by several mostly physical factors including external genitalia, which hormones are prevalent and brain structure, while gender identity is the intrinsic sense of being male, female, or another gender.

Dale also wrote that the medical understanding of biological sex and gender has advanced significantly in the last several decades, and there is now medical consensus that gender identity plays a role in an individual's determination of their own sex.

Both of the women who sued had undergone transition, the process of working to bring their lived experiences and outward appearances into alignment with their gender identities.

Idaho's vital statistics laws require that all amended birth certificates be marked as "amended," according to the court documents, including a record of the nature of the change, unless the change is a minor correction made within a year of the original error, for a voluntary acknowledgment of paternity and non-paternity, or for changes to name and paternal and maternal information in instances of adoption.

As the lawsuit began moving through the court system, Idaho's attorneys admitted the state policy was unconstitutional, but said the only way to change the policy would be through a court ruling.

There is no conceivable, rational government interest in "a prohibition against changing the sex designation on the birth certificate of a transgender individual who has undergone clinically appropriate treatment to permanently change his or her sex," the state's attorneys noted in one court document.

The judge didn't detail what the new rule should look like, but said that any new rule must not subject one class of people to any more onerous burdens than the rest of the population.

Scott Graf, the spokesman for the Idaho Attorney General's office, declined to comment on the ruling.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

(AP Photo/Nataliya Vasilyeva). In this photo taken on Saturday, March 17, 2018, performer Andrei applies make-up before a Saturday night drag show at a gay club in Yekaterinburg, Russia. The prospect of President Vladimir Putin winning another six year...

The prospect of President Vladimir Putin winning another six years in office drew an apathetic response at a gay nightclub in the Ural mountains city of Yekaterinburg.More >>

The prospect of President Vladimir Putin winning another six years in office drew an apathetic response at a gay nightclub in the Ural mountains city of Yekaterinburg.More >>

A well-known Democratic candidate for Congress who gained notoriety for his opposition to the Muslim travel ban is being forced to explain a rant he made in the mid-1990s that is being perceived as intolerant of...More >>

A well-known Democratic candidate for Congress who gained notoriety for his opposition to the Muslim travel ban is being forced to explain a rant he made in the mid-1990s that is being perceived as intolerant of gay people.More >>

Gulfport native Joshua McGill, 26, managed to escape from an Orlando nightclub during what authorities are calling the worst shooting in U.S. history. (Photo source: Facebook)

Gulfport native Joshua McGill, 26, managed to escape from an Orlando nightclub during what authorities are calling the worst shooting in U.S. history. (Photo source: Facebook)

Josh McGill spent Saturday night at the Pulse. “Everyone was having fun,” the Gulfport native said. “Typical night. They always have last call at 1:45 a.m.” McGill and his two roommates stood near a door leading to an outdoor patio. It all seemed so normal. And then, “We heard the three initial shots,” the nursing student remembered. “You just hear gunshot after gunshot after gunshot and that was very scary. And my main thought was hide.”

Josh McGill spent Saturday night at the Pulse. “Everyone was having fun,” the Gulfport native said. “Typical night. They always have last call at 1:45 a.m.” McGill and his two roommates stood near a door leading to an outdoor patio. It all seemed so normal. And then, “We heard the three initial shots,” the nursing student remembered. “You just hear gunshot after gunshot after gunshot and that was very scary. And my main thought was hide.”

Transgender woman who tried to visit incarcerated brother claims officers at maximum-security prison in Louisiana ordered her to remove her underwear and told her she would have to reveal her genitalia.More >>

Transgender woman who tried to visit incarcerated brother claims officers at maximum-security prison in Louisiana ordered her to remove her underwear and told her she would have to reveal her genitalia.More >>

Prom is supposed to be the night every senior looks forward to, but those dreams were canceled the moment Central Heights High School administrators decided the liability wasn’t worth the risk of planning the off-campus dance.

Prom is supposed to be the night every senior looks forward to, but those dreams were canceled the moment Central Heights High School administrators decided the liability wasn’t worth the risk of planning the off-campus dance.

(Photo by Chris Pizzello/Invision/AP). Sebastian Lelio, foreground center, and Nicolas Saavedra, from back left, Daniela Vega, Alejandro Goic, and Pablo Larrain accept the award for best foreign language film for "A Fantastic Woman" at the Oscars on Su...

Landmark Chilean drama "A Fantastic Woman" a stirring story of love and loss that centers on a transgender woman, wins best foreign language Oscar.More >>

Landmark Chilean drama "A Fantastic Woman" a stirring story of love and loss that centers on a transgender woman, wins best foreign language Oscar.More >>