Indonesian judges can now have child sex offenders executed or chemically castrated under a crackdown by President Joko Widodo.
"We hope this regulation will provide a deterrent effect, and bring down the number of sexual offences committed against children," he said.
The new amendment was included in the wake of the brutal gang rape and murder of 14-year-old Yuyun, a girl from Sumatra.
Seven teenage boys were convicted of the crime, and sentenced to 10 years each in prison -- a punishment many Indonesians felt was too soft.
Women's rights activists campaigned for action against sexual assault. Around 35 women each day in the country fall victim to sexual violence, according to Indonesia's National Commission on Violence Against Women.
"These crimes have undermined the development of children, and these crimes have disturbed our sense of peace, security and public order," President Widodo said. "So, we will handle it in an extraordinary way."
However, human rights groups have protested the move.
"Chemical castration risks offering a false solution, and a simple one to what is inevitably a complex and difficult problem," said Heather Barr, senior researcher on women's rights at the Human Rights Watch.
"Chemical castration on its own addresses none of these needs and medical interventions should be used, if at all, only as part of a skilled treatment program, not as a punishment," she said.