From the New Mexico Supreme Court (as reported by Think Progress):
We conclude that although none of New Mexico’s marriage statutes specifically prohibit same-gender marriages, when read as a whole, the statutes have the effect of precluding same-gender couples from marrying and benefiting from the rights, protections, and responsibilities that flow from a civil marriage. Same-gender couples who wish to enter into a civil marriage with another person of their choice and to the exclusion of all others are similarly situated to opposite-gender couples who want to do the same, yet they are treated differently.
Because same-gender couples (whether lesbian, gay, bisexual, or transgender, hereinafter “LGBT”) are a discrete group which has been subjected to a history of discrimination and violence, and which has inadequate political power to protect itself from such treatment, the classification at issue must withstand intermediate scrutiny to be constitutional. Accordingly, New Mexico may neither constitutionally deny same-gender couples the right to marry nor deprive them of the rights, protections, and responsibilities of marriage laws, unless the proponents of the legislation—the opponents of same-gender marriage—prove that the discrimination caused by the legislation is “substantially related to an important government interest.”
Unlike most other states, New Mexico had no law specifically allowing or prohibiting marriage for same-sex couples.