Alabama lawmakers passed legislation this week that would require some convicted child sex offenders to undergo chemical castration before leaving prison.

HB 379 states that anyone 21 or older convicted of a sexual offense involving children under the age of 13 would be “required to undergo chemical castration treatment in addition to any other penalty or condition prescribed by law.” The measure heads to Gov. Kay Ivey’s (R) desk for consideration.

Chemical castration is castration via continual injections of specific drugs such as medroxyprogesterone, which reduces libido and sexual activity by blocking the production of testosterone and other hormones. It is a reversible treatment for both men and women, unlike surgical castration in men, during which men’s gonads are removed.

According to the legislation, the parolee would be required to pay for the cost of the treatment but the person cannot be denied parole if they are not able to pay for treatment. Offenders would begin treatment a month before they leave prison.

Republican state Rep. Steve Hurst, who spearheaded the bill, defended the legislation against people who called it “inhumane.”

“I had people call me in the past when I introduced it and said, ‘Don’t you think this is inhumane?’” Hurst told local outlet WIAT. “I asked them, ‘What’s more inhumane than when you take a little infant child and you sexually molest that infant child when the child cannot defend themselves or get away, and they have to go through all the things they have to go through?’ If you want to talk about inhumane, that’s inhumane.”

“They have marked this child for life and the punishment should fit the crime,” he added.

California became the first state to pass a chemical castration law in 1996. Other states including Florida, Georgia, Louisiana, Montana, Oregon and Wisconsin allow chemical castration in some cases. Additionally, Texas permits repeat sex offenders to voluntarily elect to be surgically castrated.

The American Civil Liberties Union has criticized both chemical and surgical castration, arguing that the practices are akin to cruel and unusual punishment and violate a person’s right to privacy.

Hurst has pushed for similar bills in 2013, 2014 and 2016. The state representative’s past bills, however, forced child sex offenders to pay for their own surgical castration. All three measures failed to make it out of committee.

If signed into law, the measure states the legislation would go into effect on the “first day of the third month following its passage and approval by the governor.”