Updated

A federal judge dismissed criminal charges on Monday against two women who witnessed the June 30 army killing of suspected drug gang members in southern Mexico.

The judge in Mexico state ordered their immediate release after federal prosecutors failed to bring charges. The women had been held in a prison in western Nayarit state for more than five months for allegedly possessing weapons.

The two survived the mass slaying of the 22 suspected gang members and were jailed in direct violation of their human rights, after they were tortured and sexually threatened into backing the army's version of the incident, according to Raul Plascencia, the former president of the National Commission on Human Rights who oversaw the commission's investigation into the slayings.

The army originally claimed all 22 suspects died in a fierce shootout. The two women, along with a third witness, have testified to authorities that most of the suspects had surrendered and were unarmed when they were shot by soldiers.

The two were not affiliated with the suspected gang members who were killed, Plascencia told The Associated Press last month. Rather, they were prostitutes hired to accompany a leader of the group that met in an abandoned warehouse in southern Mexico on June 29.

The statement Monday from Mexico's Council of the Federal Judiciary did not name the women. They and their lawyers could not be reached for comment.

The jailing of innocents was another blotch on a case that the commission's report called a cover-up of illegal conduct by the army and by state prosecutors. The Attorney General's Office has also been criticized over its slow response in investigating the killings three months after they occurred.

The commission has said the prosecutor in Mexico state, where the killings occurred, issued a report supporting the army's initial version of the event after the two women agreed to say what prosecutors wanted.

The army at first called the women rescued kidnapped victims, but federal prosecutors later ordered them held for weapons possession.

The army's version of the confrontation drew suspicion as soon as it issued a short press release late on June 30 saying all 22 suspects were killed and only one soldier wounded. The AP visited the scene three days after the incident and found little evidence of a gunbattle, while bullet markings indicated some of the dead were shot at close range.

In September, the third woman who had been at the scene told the AP and Esquire magazine that only one person died in the shootout and the rest had surrendered.

The human rights commission's Oct. 21 report said at least 12 and possibly 15 people had been shot dead after surrendering.

The case was followed by another security disaster for the government of President Enrique Pena Nieto, the disappearance and alleged incineration of 43 teachers college students at the hands of a mayor and local police working with a local drug gang. The remains of one student have been identified so far.

The back-to-back examples of abuse of authority have caused anger across Mexico and brought protests at home and abroad.

A Mexican student who interrupted last week's Nobel Peace Prize ceremony in Oslo to bring attention to the 43 students returned home on Monday after being deported from Norway.

Adan Cortes spoke to supporters at Mexico City's airport, saying he didn't pull the stunt for fame.

"I wanted from the beginning and will continue to express my opinion, which is shared by many affected by the injustices we live in Mexico," Cortes said, adding that the students' fate "was the straw the broke the camel's back."