MEXICO CITY, Mexico (CNN) -- The Mexican Supreme Court has ordered the release of 20 people who were convicted in the massacre of 45 people in 1997.
Mexican Mayan Indian massacre survivors reenact the killings of 45 people in Acteal village in this 2003 photo.
The court ruled that authorities obtained evidence illegally and that the defendants were denied due process and lacked an adequate defense.
The 20 were convicted for taking part in a massacre in the community of Acteal, in the southern state of Chiapas. Four of five Supreme Court justices decided Wednesday to order their immediate release, the court said in a statement.
"It's obvious that the evidence was obtained illegally," said Judge Jose de Jesus Gudino.
Investigators say 45 men, women and children were killed in Acteal by people who suspected they had links to the Zapatista Army of National Liberation, a group that launched a rebellion against the Mexican state in January 1994.
It was nearly four years after that rebellion, on December 22, 1997, that the 45 unarmed indigenous peasants were massacred in Acteal. Then-President Ernesto Zedillo ordered an investigation that eventually led to arrests.
In addition to ordering 20 people released, the Supreme Court called for the review of cases involving six others who were convicted in the massacre.
Judge Juan Silva Mesa decried the judicial process that led to the convictions.
"For me there is no greater injustice than allowing them, under and in the name of the law, to commit injustice" and thereby "affect someone's fundamental human rights," he said.
CNN's Mario Gonzalez contributed to this report.