 Prior to 1997, Article 104 of the Penal Code of Kazakhstan used to criminalise "buggery".This legislation followed the corresponding Section 121 from the former Soviet Union, which only specifically criminalised anal intercourse between men.Since 2003, transgender individuals have been allowed to change their legal gender on their official identity documents in Kazakhstan.