Gov. Kay Ivey of Alabama has signed a so-called chemical castration measure into law, her office announced on Monday, leaving the state poised to set a stringent new parole condition for certain sex offenders.

Supporters of the law contend that it will enhance public safety and reduce the risk of convicted sex offenders committing similar crimes once they are released from prison. But critics of the law, which will take effect in September, think it may prove unconstitutional.

[State legislatures are moving sharply to the left and right under one-party control.]

Here is a guide to the procedure, which is used in a handful of states and in some places outside of the country.

What is chemical castration?

Chemical castration involves using a drug to reduce testosterone levels and affect the sex drive. American doctors have been using medroxyprogesterone acetate — the protocol expected to be used in Alabama — to treat sex offenders for more than 50 years.