Indonesia has toughened its punishments for child rapists to include the death penalty and chemical castration.
It follows outrage over several recent violent crimes, including the gang-rape and murder of a 14-year-old girl.
President Joko Widodo said the regulation was “intended to overcome the crisis caused by sexual violence against children”.
Previously, the maximum sentence for rape, of either an adult or a child, was 14 years in jail.
People jailed for sexual offences against children may also now be made to wear electronic monitoring devices after their release.
Analysis: Rebecca Henschke, BBC News, Indonesian service editor
The gang rape of 14-year-old Yuyun on her way home from school and the rape and brutal murder of a 18-year-old factory worker this month have sparked national outrage.
In polls and on social media there is widespread support for tougher punishments including castration and the death penalty for perpetrators, particularly when children are the victims.
But a number of leading rights activists have voiced their dissent.
Mariana Aminudi from the National Commission on Violence Against Women said on Twitter: “The castration law is evidence that the government does not view sexual assaults as act of violence but merely as a matter of controlling sexual urges.”
While Sandra Moniaga from the National Commission on Human Rights wrote: “Violence will not be stopped by violent punishments.”
Introduced by emergency presidential decree, the new rules are in effect immediately but could be overturned by parliament at a later date.
“An extraordinary crime deserves an exceptional response”, Mr Widodo said.