Nigeria’s Senate passed a bill Wednesday that approved life imprisonment for rapists and those who have sex with children under 11 years old, a Nigerian newspaper reported. The legislation could help build a stronger law against sexual crimes in the West African country where scores of women and children are subject to rape and sexual violence.

The bill included various sentences and fines for other sexual offenses such as incest, child pornography, sexual tourism, gang rape, sexual harassment, prostitution of mentally disabled persons, lacing drinks with drugs with intent to sexually abuse, and deliberately infecting someone with HIV and other diseases. The bill also mandated storing names of sex offenders in a database, Premium Times reported.

“Culprits would never be employed in any institution where they may pose a risk to unsuspecting persons. You can see that the penalties are weighty,” Sen. Chris Anyanwu, the bill’s sponsor, told the Nigerian newspaper Wednesday.

The bill also provides a witness protection program to safeguard victims and witnesses in trials for sexual crimes. The bill’s passage followed a report by Nigeria’s Committee on Judiciary, Human Rights and Legal Matters, which called for stricter penalties for sexual offenders, the Premium Times reported.

Rape and underage sex is widespread across Nigeria, and the country has long lacked strict legislation to provide legal backing for prosecuting sexual offenders. In one case, a pastor in Edo state was sentenced to just five years in prison for raping and impregnating a 12-year-old in 2013. The western state recorded 96 rape cases between January 2012 and August 2014, but only nine convictions were secured, according to an investigation by Premium Times.

“As the law stands now, there are lots of loopholes for offenders to escape convictions,” Henry Idahagbon, the attorney general and commissioner for justice in Edo, told the newspaper last year.

The new Sex Offences Bill could change that. The bill is expected to pass in Nigeria’s House of Representatives on Wednesday and then will need President Muhammadu Buhari’s signature to become effective. However, similar legislation fell short after passing in the Senate last year, under former President Goodluck Jonathan’s watch.