Idaho Gov. Brad Little (R) signed two bills into law last night to severely restrict the rights of transgender people in the state, both of which will probably be challenged in court.

One of the bills bans transgender people from correcting the gender marker on their birth certificates – joining Tennessee and Ohio as the only three states that ban transgender people from correcting their birth certificates at all. The other bill bans transgender girls from competing in high school sports and even allows parents and students from opposing teams to “challenge” a female athlete’s gender and require her to get a genital exam.

Related: Federal courts are standing up to Trump & Sessions’ anti-transgender agenda

The first bill, HB 509, is a direct retaliation against a federal court that overturned Idaho’s previous ban on transgender people correcting their birth certificates.

U.S. Magistrate Judge Candy Dale ruled in 2018 that the Idaho Department of Health and Welfare’s ban on correcting birth certificates violated the Constitution’s Equal Protection Clause because some people (like adoptive parents) were allowed to update birth certificates, while transgender people were not. The court found that there was no reason for the ban, which caused transgender people to suffer “irreparable injury and harm” because they could be outed as transgender through their official documents.

But Idaho Rep. Julianne Young (R) proposed a ban earlier this year, arguing that a birth certificate is a “historical document” and transitioning can “cosmetically imitate but never reproduce the natural function of the other biological sex.”

Her bill attempts to bypass the federal court’s decision by banning almost all changes to birth certificates outside of a few special cases in order to make it seem like she’s not targeting transgender people. But the Idaho attorney general’s office has already told the press that it estimates it will cost $1 million to defend the law in court.

Democrats decried the law.

“I am disgusted and disappointed that Gov. Little has decided to waste valuable taxpayer money to fight court battles over issues that are not a priority to Idahoans,” said state Rep. Lauren Necochea (D), who also said that the law is “unconstitutional.”

But Blaine Conzatti of the Family Policy Alliance of Idaho said that the law shows that Little is “a friend to Idaho families.”

“It is indisputable that families are made safer by this law,” Conzatti said, even though having official documents that do not reflect one’s gender identity can be downright dangerous for transgender people and, by extension, their families.

The other bill, HB 500, bans “biological males” – meaning transgender girls, since cisgender boys aren’t trying to compete as girls in sports – from competing as girls in high school sports, effectively making them choose between being who they are and participating in athletics.

Supporters of the bill said that it addresses “a new crisis” of transgender girls participating in sports.

“Supporters of this bill are attempting to fix a problem that was never there. It specifically targets people like me and all transgender female athletes and denies us the opportunity to compete in sports,” Boise State University athlete Lindsay Hecox, who is transgender, told CNN. “It’s unfair, unnecessary, and discriminatory, and it ignores the commitment we’ve made to rigorous training and the importance of athletic competition to our lives.”

The law also allows for a female student-athlete’s gender to be “challenged” and requires the athlete to undergo medical exams to “prove” it. A doctor, the law says, will have to examine the athlete’s genitalia, hormones, and DNA and make a determination of their gender, something that Democrats pointed out is not recommended by the American Academy of Pediatrics.

“This bill asks doctors to perform procedures way outside of the standards of care,” pediatrician Jessica Duvall told Forbes. “Moreover, even if the tests were performed against medical society norms, more often than not they do not yield clear, easily interpreted results.”

Moreover, Democrats said that the law could allow competitors with a grudge against a girl on an opposing team to challenge her gender, and that the threat of such a challenge – and the ensuing invasive testing – could make even cisgender teen girls afraid to compete in school sports.

“It would damage and hurt her reputation and dignity for life,” said Idaho Sen. Michelle Stennett (D) when the bill was being debated in the legislature.

HRC said that both laws are unconstitutional, an attack on transgender Idahoans, and a bad use of the state’s time during a global pandemic.

“We are living in an unprecedented global health crisis, with confirmed cases of COVID-19 increasing on a daily basis in Idaho, across the United States and around the world, but Governor Brad Little and the Idaho legislature have decided to prioritize the demonization of transgender people,” said HRC President Alphonso David in a statement.

“This is unacceptable, and a gross misuse of taxpayer funds and trust. Idaho is leading the way in anti-transgender discrimination, and at a time when life is hard enough for everyone, Idaho’s elected leaders will be remembered for working to make their transgender residents’ lives even harder.”

Little signed the bills last night, the day before the Transgender Day of Visibility.