Montgomery, Ala. -- Alabama Gov. Kay Ivey has signed into law legislation that would require certain sex offenders to be chemically castrated before their parole. Gov. Kay Ivey's press office said Monday that she had signed the bill, which is to take effect later this year.

The measure applies to sex offenders convicted of certain crimes involving children younger than 13. The bill applies to those who commit their crimes after September 1, 2019, CBS affiliate WIAT-TV reports.

Chemical castration involves injection of medication that blocks testosterone production. Under the measure, certain offenders must receive the medication before they are paroled from prison. A judge would decide when the medication could be stopped.

Get Breaking News Delivered to Your Inbox

Several states have authorized chemical castration, but it's unclear how often it's used. Some legal groups have raised concerns about use of forced medication.

Republican Rep. Steve Hurst had proposed the measure for more than a decade.

"I had people call me in the past when I introduced it and said, 'Don't you think this is inhumane?'" Hurst told WIAT-TV. "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."

Meanwhile, Randall Marshall, the head of the ACLU of Alabama, said chemical castration could violate the U.S. Constitution.

"It could be cruel and unusual punishment. It also implicates right to privacy. Forced medications are all concerns," Marshall told WSFA.