LITTLE ROCK, Ark. (AP) — The U.S. Department of Justice on Thursday challenged bans involving transgender people that target children in Arkansas and athletes in West Virginia, slamming them as violations of federal law.

The department filed a statement of interest in a lawsuit that seeks to overturn a new law in Arkansas. Arkansas became the first state to ban gender-confirming treatments or surgery for transgender youth.

The DOJ said the law in Arkansas violates the equal protection clause of the 14th Amendment.

In Arkansas, the ACLU filed a lawsuit last month challenging the transgender youth prohibition, which is set to take effect on July 28. It prohibits doctors from providing gender-confirming hormone treatment, puberty blockers, or surgery to anyone under 18 years old, or from referring them to other providers for the treatment.

The ACLU filed the lawsuit on behalf of four transgender youth and their families, as well as two doctors who provide gender-confirming treatments. The lawsuit argues the prohibition will severely harm transgender youth in the state and violate their constitutional rights.

“A state law that specifically denies a limited class of people the ability to receive medically necessary care from their healthcare providers solely on the basis of their sex assigned at birth violates the Equal Protection Clause,” the Justice Department filing said. “These restrictions explicitly target transgender people.”

Republican lawmakers enacted the ban in April, overriding a veto by GOP Gov. Asa Hutchinson. The Arkansas governor vetoed the ban following pleas from pediatricians, social workers and the parents of transgender youth who said the measure would harm a community already at risk for depression and suicide.

Hutchinson said the law went too far, especially since it wouldn’t exempt youth already receiving the care. Gender confirming surgery is currently not performed on minors in Arkansas.

Arkansas Attorney General Leslie Rutledge, also a Republican, asked a federal judge this week to dismiss the lawsuit over the state’s ban. And West Virginia Republican Attorney General Patrick Morrisey on Thursday asked a judge to allow him to intervene on the state’s behalf to defend the athlete ban.

Rutledge’s office rejected the Justice Department’s argument, saying the state’s prohibition “absolutely doesn’t discriminate based on transgender status.”

“The Biden Administration’s brief makes the frivolous argument that it does,” Stephanie Sharp, a spokesperson for Rutledge, said in a statement. “But that brief illustrates the weakness of its position — so weak that the Administration resorts to pages of personal attacks against Arkansans’ elected representatives.”

Several other states also have enacted bills this year over school sports participation bans. South Dakota Gov. Kristi Noem implemented the move by executive order. Other states, including Kansas and North Dakota, passed bans only to have them vetoed by the governor.

In February, the Biden administration withdrew government support for a federal lawsuit in Connecticut that seeks to ban transgender athletes from participating in girls’ high school sports. A federal judge dismissed that lawsuit in April.

The lawsuit filed on behalf of student Michael Critchfield accused the board of failing to create a safe school environment. The ACLU had said Liberty High School Assistant Principal Lee Livengood followed Critchfield into the boy’s bathroom in November 2018 at the school and said, “You freak me out.” Critchfield said he also was ordered to prove his gender by using a urinal. He was 15 at the time.

An attorney for Livengood had previously argued that his client was unaware of Critchfield’s gender identity and was not told of an arrangement Critchfield had with the principal to use the boys restrooms.