The New Mexico Supreme Court unanimously affirmed on Thursday the right of same-sex partners to marry in the state, reasoning that the “protections and responsibilities that result from the marital relationship shall apply equally” to them and to opposite-sex couples.

With the ruling, which takes effect immediately, New Mexico becomes one of 17 states and the District of Columbia to permit same-sex marriage. Thirty-three states limit marriage to opposite-sex couples. “Today’s decision is a powerful affirmation that same-sex couples are equal members of New Mexico’s diverse culture and must be given the same legal protections and respect as other families,” Shannon Price Minter, legal director of the National Center for Lesbian Rights, which joined the American Civil Liberties Union to bring the case to court, said in a statement.

In a written opinion, the court’s five justices agreed that marriage rights for same-sex couples are guaranteed under the equal-protection clause of the New Mexico Constitution, amended in 1972 to state that “equality of rights under law shall not be denied on account of the sex of any person.”

Justices weighed this amendment against the opposition’s argument that prohibiting same-sex marriage was necessary to protect the government’s “overriding interest of responsible procreation and childrearing.”