Alabama Gov. Kay Ivey on Friday signed legislation to outlaw puberty blocking medications for minors.

The bill makes it a felony, punishable by up to 10 years in prison, to prescribe puberty blockers or hormones to transgender people under age 19 to help in their gender transition. 

ALABAMA JOINS FLORIDA IN PROHIBITING CERTAIN SCHOOL TEACHERS FROM DISCUSSING GENDER, SEXUAL MATTERS

The bill also prohibits gender transition surgeries, although doctors told lawmakers those are generally not done on minors.

Alabama Gov. Kay Ivey on Friday signed legislation to outlaw gender-affirming medications for transgender youths. (Photo by Taylor Hill/Getty Images)

Ivey signed the legislation a day after state lawmakers passed the bill. Groups have vowed to challenge the law in court. 

Alabama is the second state to try to impose a ban on gender-affirming care for minors and the first to impose criminal penalties.  A similar measure in Arkansas, which would have banned doctors from prescribing the medications, was blocked by a federal judge.

CLICK HERE TO GET THE FOX NEWS APP

Ivey also signed legislation prohibiting certain elementary school teachers from discussing gender identity and sexual orientation matters in school.

The Associated Press contributed to this report.