The judge overseeing a controversial case involving a Muslim compound in New Mexico has been forced to close her courtroom after receiving hundreds of death threats.

Judge Sarah Backus was referred to as an "Islamic terrorist sympathiser" by critics after granting bail to five people accused of training children to carry out school shootings at the makeshift, high-desert compound police raided earlier this month.

Authorities found 11 children in need of food and water inside of the filthy complex, which lacked plumbing and included a shooting range with loaded weapons.

The body of a toddler was also found buried at the site days later.

The five accused have pleased not guilty to the charges against them.

While the accusations were "troubling and unusual,” the judge said prosecutors failed to provide evidence of child abuse or threats to society. The five defendants were then granted $20,000 bail each and ordered to comply with specific restrictions, which include wearing GPS ankle bracelets and not being permitted back to the compound.

The ruling sparked outcry online, as people called and threatened violence against Ms Backus. The courthouse was then placed on lock down after threats were made to all staff.

Her decision to grant bail also triggered a response online after being reported by Fox News, with critics slamming the decision and calling the judge "a danger to the community”.

11 children rescued from squalid desert compound in New Mexico

Susana Martinez, the state’s Republican governor, also rebuked the judge's decision to grant bail for the five defendants.

"The dangerous accused criminals in the Taos compound case should never have been released on bail," she said in a statement.

Prosecutors allegee two teenage children living inside the compound received training from the defendants — described by police as "Muslim extremists" — in conducting mass shootings. T

New Mexico compound search Show all 6 1 /6 New Mexico compound search New Mexico compound search Aerial photo released by Taos County Sheriff's Office shows a rural compound during an unsuccessful search for a missing 3-year-old boy in Amalia, New Mexico AP New Mexico compound search Taos County Solid Waste Department Director Edward Martinez, center, surveys property conditions at a disheveled living compound at Amalia, N.M., on Tuesday, Aug. 7, 2018 AP New Mexico compound search Siraj Ibn Wahhaj, left, sits next to public defense attorney Aleks Kostich at a first appearance in New Mexico state district court in Taos, New Mexico, Wednesday, Aug. 8, 2018, on accusations of child abuse and abducting his son from the boy's mother AP New Mexico compound search Lucas Morton arrives in court to plead not guilty to child abuse charges in state district court in Taos, New Mexico, on Wednesday, Aug. 8, 2018 AP New Mexico compound search Subhannah Wahhaj appears in New Mexico state district court to plead not guilty to charges of child abuse in Taos, New Mexico, Wednesday, Aug. 8, 2018, alongside public defense attorney Greg Dawkins, left AP New Mexico compound search This Friday, Aug. 3, 2018, photo released by Taos County Sheriff's Office shows a rural compound during an unsuccessful search for a missing 3-year-old boy in Amalia, New Mexico AP

But the judge did not see a specific violent threat to the compound’s surrounding communities. Meanwhile, residents are polarised in their thoughts on the incident; while some believe the defendants were training children to conduct shootings, others said they were a religious family simply trying to live off the grid, Reuters reported.