Prosecutors are investigating an allegation that a Georgia man and four other adults who lived with children in a squalid desert compound in New Mexico were training them to carry out school shootings, according to court documents filed on Wednesday.

Siraj Ibn Wahhaj, 40, and four of his relatives were charged with child abuse this week after 11 malnourished children were discovered in a makeshift compound in northern New Mexico last week. The children, ages 1 to 15, had barely any food and no access to fresh water or basic hygiene, the authorities said.

A foster parent of one of the 11 children told the authorities that the adults had trained the child in the use of an assault rifle in preparation for carrying out school shootings, according to court documents that prosecutors filed with New Mexico’s Eighth Judicial District Court. In the documents, prosecutors requested that the judge keep Mr. Wahhaj and the other defendants in detention because they posed a threat to the children and the broader community.

At court appearances on Wednesday, all five defendants pleaded not guilty, according to court documents. The judges overseeing the cases ordered that they be detained until their next hearing.