The state assembly in Kaduna, in north-western Nigeria, has approved full surgical castration as punishment for those convicted of raping children under 14.
State commissioner for woman’s affairs and social development, Hafsat Baba, described the approval by the state assembly as a "welcome development" and said that it will serve as "deterrent" for rapists.
State governor Nasir Ahmad el-Rufai will now need to sign the bill for it to become law in the state.
In June Nigerian governors declared a state of emergency over rape and violence against women and children in the country.
The number of successful prosecutions of rape suspects remains low and stigma often prevents victims from reporting incidents.
'It will deter rapists'
Surgical castration of convicted rapists has been mooted in Nigeria for a while, especially as cases spiked during the recent coronavirus lockdown.
There was widespread outrage in July following the murder of a 22-year-old university student who her family say was brutally raped and bludgeoned to death.
It was one of several shocking cases within a week that led to street protests, an online petition signed by thousands and a Twitter hashtag #WeAreTired.
Many Nigerians called for tougher laws, such as the death penalty.
"We feel that the new law will go a long way to curbing rising cases of rapes in our state," Kaduna lawmaker Shehu Yunusa told the BBC."If the Kaduna governor signs [this] into law, the next rapist caught in Kaduna might become the first person to be castrated under this new law," he said.
Gender activist Dorothy Njemanze - a former victim - welcomed the bill and said she would like to see it adopted in other Nigerian states.
"In retrospect, if everyone that raped me was put through that [surgical castration] other people that they might have also raped would have been spared the calamity," she said.
Surgical castration is not widely practised in the world and is considered controversial in the few places where it still used.
It is not in the guidelines drawn up by the International Association for the Treatment of Sexual Offenders (IATSO) and critics argue that the physical effects are irreversible and may have serious physical and mental consequences.