In this March 30, 2021, file photo, demonstrators for transgender rights rally outside the Alabama State House in Montgomery.
Washington CNN  — 

The Justice Department on Friday challenged an Alabama law that makes it a felony for a doctor to administer gender-affirming health care to minors.

“This lawsuit challenges a state statute that denies necessary medical care to children based solely on who they are,” the department said in its complaint.

The complaint filed Friday alleges that “the new law’s felony ban on providing certain medically necessary care to transgender minors violates the Fourteenth Amendment’s Equal Protection Clause.”

The Justice Department is asking the court to issue an immediate order blocking the law, which is set to go into effect on May 8.

Alabama’s Senate Bill 184, which Republican Gov. Kay Ivey signed into law earlier this month, states that medical professionals who provide gender-affirming care to people 18 and under could face up to 10 years in prison.

The measure is part of a larger movement by Republican-led states to impose restrictions on the lives of transgender youth in the US. Despite the legislative push to end this kind of treatment, gender-affirming care is a recommended practice for people who identify as transgender, meaning they identify with a gender that is different from the one assigned at birth, or gender-diverse, with a gender expression that doesn’t strictly match society’s traditional ideas about gender.

Separately, two families with transgender teenagers and two doctors sued the state of Alabama over the law earlier this month, also arguing it violates the equal protection clause of the 14th Amendment to the US Constitution.

“The Transgender Plaintiffs are currently receiving medical care, including puberty blockers and hormone therapy, for gender dysphoria,” that lawsuit stated. “If allowed to take effect, the Act will interrupt these medically necessary treatments, prevent them from obtaining future medically necessary treatments for gender dysphoria, and cause them to experience irreparable physical and psychological harm.”

Gina Maiola, communications director for Ivey, previously told CNN that the governor’s office is “prepared to defend our values and this legislation” and Ivey has touted the law as a campaign accomplishment.

In a tweet on Friday, Ivey said, “Some things are just facts: summer is hot, the ocean is big and gender is a question of biology, not identity.”

CNN’s Mary Kay Mallonee contributed to this report.