State prosecutors failed to meet a simple legal requirement in the case against three people at a Muslim compound in New Mexico.

The judge said Wednesday he had no choice but to dismiss all charges against the three defendants due to the prosecutors’ error.

The three, plus two others, were arrested during a raid where police found 11 malnourished children in poor living conditions, and the remains of a 3-year-old boy.

A head-scratching prosecutorial misstep caused a New Mexico judge to dismiss all charges against three of the five defendants arrested at a suspected Muslim extremest compound earlier this month.

Judge Emilio Chavez said Wednesday he had no choice but to release defendants Lucas Morton, Subhanna Wahhaj and Hujrah Wahhaj because state prosecutors failed to schedule a probable cause hearing within 10 business days of their arrest, as required by law. (RELATED: All Charges Dismissed Against Three Suspects In New Mexico ‘Jihadi’ Case)

The trio was arrested along with two other suspects, Siraj Wahhaj and Jany Leveille, after authorities raided their ramshackle compound on Aug. 3. During the raid, police discovered 11 malnourished children living in squalor, as well as the remains of a 3-year-old boy who was later identified as Siraj Wahhaj’s missing son, Abdul-Ghani Wahhaj. All five defendants were subsequently charged with 11 counts of felony child abuse.

Police also found multiple firearms and evidence suggesting the adults had been training the children to commit some kind of mass shooting, according to court records. On Tuesday, prosecutors said a handwritten note titled “Phases of a Terrorist Attack” was among the documents seized at the compound. (RELATED: ‘Phases Of A Terrorist Attack’ — Document Found In New Mexico Compound)

Despite the seriousness of the charges and the high-profile nature of the case, the district attorney’s office apparently failed to follow through on routine criminal procedure.

“For whatever reason, the state did not obtain a preliminary hearing date within 10 days,” said Aleksandar Kostich, a public defender representing Morton, according to the Washington Post. “It’s absolutely bizarre.”

Megan Mitsunaga, the public defender representing Subhanna Wahhaj, said the district attorney’s office provided no explanation as to why it did not schedule the probable cause hearing.

“I would have thought they’d be more on top of things, the way they continued to seek to hold them without bond,” she said, according to WaPo.

Judge Jeff McElroy offered the same criticism of prosecutors when he dismissed the charges against Leveille and Siraj Wahhaj in a separate hearing on Wednesday. He excoriated District Attorney Donald Gallegos and state attorneys for their “complete failure” to follow proper criminal procedures.

“I don’t know if they are overworked or they don’t have enough people at their office,” McElroy said. “I don’t see the district attorney here or the chief deputy district attorney, but it is disturbing to me that the district attorney would put this court in that kind of a situation.”

Almost immediately after the original charges against Leveille and Siraj Wahhaj were dismissed, the pair was arraigned on upgraded felony child abuse charges in connection with the death of Abdul-Ghani Wahhaj. They remain in custody pending a hearing set for Tuesday.

Follow Will on Twitter

Send tips to will@dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.