Indonesia's parliament has passed controversial laws authorizing chemical castration, minimum sentences and execution for convicted paedophiles, reports BBC.
President Joko Widodo proposed the changes in May following the gang rape and murder of a 14-year-old girl.
The laws were subject to fierce debate in parliament, with two opposition parties voting against castration.
Human rights groups have objected to the punishments, arguing that violence will not be stopped by violence.
The Indonesian Doctors Association said administering chemical castration would violate its professional ethics and said its members should not take part.
The procedure entails injecting convicts with female hormones. It is used on sex offenders in Poland, South Korea, Russia, and some US states, among others. Prisoners in UK jails can volunteer for the treatment.
The new laws also allow judges to sentence paedophiles to death or tag them electronically, and applies a 10-year minimum sentence for child sex crimes.
Human rights groups including the National Commission for Women (NCW) criticised the laws and called for them to be re-evaluated each year to test whether they are a deterrent.
Dr Yohana Susana Yembise, Indonesia's Minister for Women Empowerment and Child Protection, said the administration was "praying" that the punishments "will have the desired effect".
She said: "Now we have the harshest punishments: the death penalty, life in prison, chemical castration, the public naming of perpetrators and the electronic chip. These are now law, so even if you hate the idea of them everyone now has to support this."
The punishments follow a number of high profile cases of child sexual abuse in the country. Last year, a British-Canadian teacher and an Indonesian were jailed for 10 years for sexually abusing three children at a Jakarta kindergarten.
And earlier this year, the body of a nine-year-old girl was found in a cardboard box in Jakarta after she had been repeatedly sexually assaulted and killed.