In a historic decision, Colombia’s constitutional court opened the door on Wednesday for same-sex couples to legally adopt children.

In the six-two ruling, the court said adoption agencies could not discriminate against gay, lesbian and transsexual couples during an adoption process.

Colombia’s Catholic church immediately denounced the decision as violating the rights of children and going against the wishes of the majority of Colombians who, according to polls, overwhelmingly reject giving same-sex couples equal rights to marriage and adoption.

“Our protest is emphatic,” Monsignor Juan Vicente Cordoba, a church spokesman, told RCN TV, reiterating the church’s demand that the issue be decided by a plebiscite. “We have the right so that the voice of the majority of Colombians is heard. The court is there to take care of the laws, not change them.”

Supporters of the decision said it could help streamline the adoption of 10,000 children in Colombia under the protection of welfare agencies.

The government argued in favour of the plaintiffs in the landmark case. In 2014, the high court paved the way for Wednesday’s decision when it authorised adoption rights for same-sex couples in which one member is a biological parent.

With Wednesday’s decision, Colombia joins only a handful of nations in Latin America, including Uruguay and Argentina, in allowing same-sex couples to adopt. It also comes on the heels of a number of gay-friendly rulings, including one reaffirming the rights of same-sex couples to form civil unions with the same inheritance and legal rights as married couples. Still pending is a proposal to allow same-sex couples the right to wed.