The Supreme Court of Mexico issued a unanimous ruling Wednesday afternoon that paves the way to universal marriage rights in the country.

The actual ruling won’t be published for a little while, but the gay rights advocates who brought the case are proclaiming that today’s ruling “opens the door to equal marriage in the whole country.”

The court ruled on behalf of three same-sex couple seeking to marry in the southern state of Oaxaca. The court had already ruled in 2010 that gay marriages performed under a Mexico City ordinance had to be recognized nationwide. With this precedent, the remaining bans on gay marriage in most Mexican states could quickly fall.

This ruling does not immediately eliminate marriage statutes limiting unions to a man and a woman—the Mexican Supreme Court doesn’t have the power to strike down state laws like that en mass as the United States Supreme Court does. But the lawyer who brought the case, Alex Alí Méndez Díaz, said before the ruling that victory would mean the beginning of the end for bans on same-sex marriage.

(More about Méndez here—he started the case as a law student.)

The court’s ruling that the ban on same-sex marriage is unconstitutionally discriminatory is partly based on a February ruling from the Inter-American Court of Human Rights that governments can’t discriminate on the basis of sexual orientation, Karen Atala Riffo y Niñas v. Chile.

This case could have repercussions outside of Mexico—by expanding this precedent to include the right to marry, courts in other Latin American countries that recognize the Inter-American Accord on Human Rights could follow this precedent and determine that marriage rights are also protected in their countries. And the Inter-American Court itself could be more likely to recognize a right to marry—a case brought by three couples trying to strike down Chile’s ban on gay marriage has already begun making its way through the international judicial system.