Moldovan parliament voted to make chemical castration mandatory for those convicted of violently abusing children under 15.
The new law states that both Moldovans and foreigners convicted of violent paedophile offences will be chemically castrated.
Rapists will also face castration, to be decided on a case by case basis.
Many Moldovans believe their country has become a destination for international sex tourists, AP reports.
Five of the nine people convicted for child sex offences in Moldova in the past two years have been foreigners, the agency says.
The Liberal Party MP who steered the bill through parliament, Valeriu Munteanu, said there had been 15 cases in recent years of violent paedophiles reoffending in Moldova.
Chemical castration involves a man taking hormones which suppress the production of testosterone for three months, leading to a decreased sex drive.
Some MPs in Moldova’s parliament questioned the efficacy of chemical castration, pointing out that it is reversible – and calling for alternative methods to be considered, according to Moldovan newspaper Timpul.
Amnesty International Moldova has condemned the decision, saying it undermines the basic right to physical and mental integrity.
Executive Director Cristina Pereteatcu said chemical castration was “incompatible with human rights, which are the foundation of any civilized democratic society”.
Poland introduced mandatory chemical castration for some sex offenders in 2009, and Russia has recently introduced similar legislation.
Both Germany and the Czech Republic have been criticized by Europe’s top human rights body for using voluntary surgical castration to treat sex offenders.
Moldova’s new law will come into force on 1 July.