Allen was found guilty of kidnapping, attempted rape and the murder of 17-year-old Sandra Phillips in 1994.
Fry was sentenced to death in 2000 for fatally stabbing and bludgeoning Betty Lee, a mother of five.
In separate cases, Fry was sentenced to life in prison for three murders in 1996 and 1998 in San Juan County.
New Mexico’s dormant capital punishment statute prohibits death sentences that are excessive and disproportionate.
The majority court opinion written by Justice Barbara Vigil, and joined by two other justices, found no meaningful distinction between the inmates’ crimes and equally horrendous cases that would justify imposing the death penalty.
“The absence of such a distinction renders the ultimate penalty of death contrary to the people’s mandate,” she wrote.
In the dissenting opinion, Chief Justice Judith Nakamura said the decision overrides the Legislature’s intention to preserve the death penalty for prior convictions.
“The majority misstates the governing law and has done what our Legislature would not: repeal the death penalty in its entirety,” she said.