Ex-Soviet Kazakhstan's parliament on Thursday passed an amendment to the criminal code to allow chemical castration of convicted paedophiles if there was a court order.
Senator Byrganym Aitimova said that castration would be "temporary", consisting of a "one-time injection" based on "the necessity of preventing the man from (committing) sexual violence."
Any such decision would be provided by a court in consultation with a medical authority, according to the amendment.
The bill has been sent to the office of President Nursultan Nazarbayev for approval.
Paedophilia-related crimes carry sentences of up to 20 years in Kazakhstan.
Chemical castration is practised in many countries although nations that force sex offenders to accept the medication are in the minority.
Unlike surgical castration, chemical castration does not prevent a person from experiencing sexual urges indefinitely, although sceptics argue it does not necessarily prevent future attacks. Some rights groups oppose the practice.
Last year Kazakhstan's state prosecutor said there had been a spike in child rapes with figures doubling to almost 1,000 cases annually between 2010 and 2014.
The authoritarian Central Asian country's bicameral parliament largely serves to rubber- stamp policies made by the government.