New Mexico sheriffs searching for a missing 3-year-old boy stumbled upon a heavily armed compound housing 11 starving children, authorities said Sunday.

The children, ages 1 to 15, were discovered in the “Third World”-worthy compound, which was built out of garbage, in the desert near Amalia.

“I’ve been working this job for 30 years, and I’ve never seen anything like this,” Sheriff Jerry Hogrefe told the Santa Fe New Mexican newspaper.

“People live off the grid, but man, not like this.”

Hogrefe described the compound as “the saddest living conditions and poverty” he has ever seen.

Adults and children were barefoot and wore “dirty rags” as clothing and had probably been living there for several months, Hogrefe said.

High-power weapons also were discovered at the site, the paper said.

The raid came after cops received a message believed to have originated inside the compound that stated, “We are starving and need food and water.”

“I absolutely knew that we couldn’t wait on another agency to step up and we had to go check this out as soon as possible,” Hogrefe said.

At the time, cops were searching for a 3-year-old boy, Abdul-Ghani Wahhaj, who went missing from Clayton County, Ga., in December and was believed to be in the area.

The authorities had their eye on the compound for two months, but they could not find probable cause to storm the place until they received the message that people were malnourished.

In a press release, Hogrefe said he had heard that the adults in the compound were “extremist of the Muslim belief.” He later said the FBI told him that, although the FBI declined to confirm it, according to the Santa Fe New Mexican. The FBI did not return a call for comment.

Police arrested two men, Siraj Wahhaj and Lucas Morten, after discovering the compound. Three women who are believed to be the children’s mothers were detained and released.

Wahhaj was collared on an outstanding arrest warrant from Georgia alleging child abduction. He was found inside the compound with an AR-15 rifle, five 30-round magazines and four loaded pistols.

Police arrested Morten on suspicion he was harboring a fugitive, officials said.

The children were turned over to state child welfare workers.

“The children are in our custody, and our No. 1 priority right now is their health and safety,” New Mexico Children, Youth and Families Department Secretary Monique Jacobson said in a statement.

“We will continue to work closely with law enforcement on this investigation.”

With Post wires