Lawmakers in Uruguay have approved an historic transgender law that sets the legal guidelines for people who want to change their gender, the AFP reported.

The bill was approved on October 5 in the Senate and last month by the country's lower chamber, the Chamber of Deputies. It now heads to the desk of President Tabare Vazquez, who recently signed bills that grant gay and lesbian couples the right to civil unions and adoption.

“Every person has the right to freely develop their personality in accordance with the proper identity of their gender, independent of their biological, genetic, anatomic … identity,” the bill reads.

The measure allows people over the age of 18 to alter their name and sex on all official documents, including birth certificates and passports. Applicants cannot request a second change for at least five years.

Senators approved the bill unanimously over the objections of the Roman Catholic Church and conservatives.

Transgender rights activists have hailed the legislation.

Church officials, on the other hand, have criticized all three pro-gay bills, and have called on voters to oust lawmakers who supported the measures on Sunday, October 25, election day.