Indonesia's parliament has passed controversial laws authorising chemical castration, minimum sentences and execution for convicted paedophiles.
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.
Azriana, the head of the NCW, said: "Other countries that have chemical castration have not seen a reduction in sexual crime against children. Also it's a very expensive procedure and what we should be spending and investing our money in is services to support and help the victims."
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.