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.”