The governor of a state in Nigeria has enacted a new law that imposes surgical castration on convicted rapists and the death penalty on those whose victims are under age 14.

“Drastic penalties are required to help further protect children from a serious crime,” said Gov. Nasir Ahmad el-Rufai, of the country’s Kaduna state.

The maximum prison sentence for rapists also was increased to life imprisonment under the new law, which el-Rufai signed Wednesday. The previous sentences topped out at 21 years for the rape of an adult and life in prison for victimizing a child.

PAKISTAN PM SUGGESTS SURGICAL CASTRATION FOR RAPISTS AFTER WOMAN GANG RAPED ON HIGHWAY

Men convicted of raping anyone younger than 14 under the new law will be punished with surgical castration and death, according to a two-page amendment dated Sept. 11 that el-Rufai posted to Twitter on Wednesday.

Women convicted of raping children can be punished with bilateral salpingectomy, or the removal of their fallopian tubes, and death according to el-Rufai.

The new law comes two days after Pakistan’s Prime Minister Imran Khan suggested surgical castration as a punishment following the violent gang rape of a woman who ran out of gas on a deserted highway in the country’s Punjab province.

In the U.S., Alabama Gov. Kay Ivey last year signed into law a bill ordering “chemical castration” as a punishment for convicted child molesters as a condition of parole.

"This bill is a step toward protecting children in Alabama," the Republican said at the time.

CLICK HERE TO GET THE FOX NEWS APP

That law would require sex offenders whose crimes involved children under 13 to receive medication that is supposed to lower their testosterone levels and their sex drive. At least seven other U.S. states have such a punishment on the books, but it is reportedly rarely used and remains highly controversial.

The Associated Press contributed to this report.