Colombia's constitutional court ruled on Wednesday that gay couples will be allowed to adopt children.

As the BBC reports, so long as the proper legal requirements are met, same-sex couples will now have the same adoption rights as heterosexual couples. Furthermore, adoption agencies will not be allowed to discriminate against them.

The constitutional court, which ruled in favor of lifting the ban by a 6-2 vote, decided that excluding gay couples as possible adoptive parents was a restriction on a child’s right to a family.

Maria Victoria Calle Correa, the chief justice of the constitutional court, noted that sexual orientation had nothing to do with a person’s ability to raise a child.

"A person's sexual orientation or gender are not in and of themselves indicative of a lack of moral, physical or mental suitability to adopt," she said.

This latest ruling is a remarkable turnaround from a decision made earlier this year. As the BBC reports, back in February, Colombia's constitutional court ruled that same-sex couples could only adopt a child, if that child was the offspring of one of the partners.

At the time, Armando Benedetti, a socialist senator from Barranquilla, called the constitutional court judges "cowards."

Opposition to same-sex couples being allowed to adopt was fierce.

Augusto Castro Quiroga, the president of Colombia's Conference of Bishops, made it clear that he would fight for children to have both a father and a mother.

"Two mums don't make a dad," Quiroga said.

Although same-sex couples are allowed to enter into legal unions in Colombia, gay marriage remains illegal.

As previously reported, President Juan Manuel Santos shocked his nation last year by voicing his support for gay marriage.

"Marriage between homosexuals seems to me perfectly acceptable, and what's more I defend unions between two people of the same sex with the same rights and all the same privileges that this union should have," he said.