The Mexican Supreme Court ruled Wednesday that the ministry overseesing pensions and health benefits — the Instituto Mexicano de Seguro Social — must give same-sex couples who are married or registered under state civil union laws all the same benefits of opposite-sex couples.

The ruling specifically addressed the question of whether someone whose spouse dies is entitled to survivor's benefits under Mexico's Social Security law, which includes pensions and access to medical services. The case was initially brought by a couple who were refused the right to enroll in full spousal benefits, but one of them died before the case was decided.

Mexico's Supreme Court does not usually release written opinions until several weeks after judgements are announced. But according to press reports, Minister José Fernando Franco González Salas explained when announcing the ruling that the court interprets the Social Security law as requiring a same-sex couple's union be treated "the same as if it were a marriage between people of opposite sexes."

Mexico City is the only Mexican jurisdiction to have enacted marriage equality legislation, but the Supreme Court ruled in 2010 that Mexico City's marriages must be recognized throughout the country. In 2012, the Supreme Court ruled that states could not deny marriages to same-sex couples, and couples in several other states have since successfully petitioned courts for the right to marry. Mexico City and three other states also have civil union statutes open to same-sex couples.