MEXICO CITY (CBS/AP) — Mexico’s supreme court has ruled it is unconstitutional for Mexican states to bar same-sex marriages.

But the court’s ruling is considered a “jurisprudential thesis” and does not invalidate any state laws, meaning gay couples denied the right to wed would have to turn to the courts individually. Given the ruling, judges and courts would have to approve same-sex marriages.

READ MORE: Two Die In Sunday Night East Oakland Shooting

The high court ruled that any state law which considers the ultimate purpose of marriage to be “procreation, and or defines (marriage) as celebrated between a man and a woman, is unconstitutional.”

READ MORE: Steph Curry, Draymond Green Ready For Play-In Game; Warriors To Take On Lakers Wednesday Night

Gay marriage is legal in some parts of Mexico, including Mexico City and the northern state of Coahuila.

The ruling was delivered June 3, but didn’t become known until this week.

MORE NEWS: Demonstrators Call on San Francisco to Keep Great Highway Closed to Cars

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.