Mexico's highest court on Tuesday struck down a law in the state of Campeche that prohibits gay and lesbian couples from adopting children.

In a 9-1 ruling, Mexico's Supreme Court said that the ban was unconstitutional.

Campeche's law said that only married couples could adopt children, but the state prohibits gay couples from marrying and does not recognize their out-of-state marriages.

“What we have here really is discrimination between heterosexual couples and same-sex couples, because although there is no definition of marriage itself, and although it is said that this new society can be shaped by people of the same sex and different sex, the truth is that if we look at the system carefully, marriage is forbidden for people of the same sex, and the only possibility for same-sex couples is coexisting in civil society,” Minister Arturo Zaldivar Lelo de Larrea wrote in the decision.

In June, the high court effectively legalized marriage equality throughout Mexico.

(Related: Mexico Supreme court strikes down marriage bans; Chihuahua joins equality states.)