A self-styled prophet accused of secretly marrying young girls because of his beliefs in polygamy and doomsday pleaded guilty in Utah Wednesday to child rape and abuse charges filed after police raided the group's remote desert compound.

Samuel W. Shaffer faces at least 25 years in prison after agreeing to the Wednesday plea deal in Iron County, where prosecutors said he abused an 8-year-old girl related to a group member, the Spectrum newspaper reported.

Child kidnapping and additional abuse courts were dropped in an agreement that keeps the girl from having to testify, said Iron County Attorney Scott Garrett.

Shaffer and a friend formed a group called the Knights of the Crystal Blade based on arcane Mormon ideas long abandoned by the mainstream church and each believed himself married to two young girls, prosecutors have said.

The four girls were found hidden in 50-gallon (190-liter) plastic water barrels and an abandoned trailer after police raided a makeshift compound made of shipping containers about 275 miles (440 kilometers) south of Salt Lake City in December.

Shaffer, 34, also faces child bigamy, child kidnapping and other charges in Sanpete County, where prosecutors say the men conducted secret marriages they thought were ordained by God before decamping to the compound. His attorney Troy Sundquist did not immediately return a call seeking comment.

His fellow self-styled prophet, John Coltharp, 34, is also facing child bigamy and other charges there. Authorities believe the two men each held the title of prophet at different points.

Coltharp is expected to waive an evidence hearing at a Sanpete County court Wednesday afternoon, his attorney Paul Frischknecht said.

Each man believed they were married to two girls, ages 4 through 8, prosecutors have said. The girls were related to the men, prosecutors have said. Authorities believe the two older girls were sexually abused, but the investigators haven't yet uncovered evidence two younger girls had been abused, according to prosecutor Kevin Daniels in Sanpete County.

The charges were filed after sheriff's deputies descended on the rural Iron County compound with helicopters and dogs after the mother of two of the girls reported them missing, along with two of her sons. The men had taken the children there months before in preparation for an apocalypse or in hopes of gaining followers, authorities said.

The boys were found in the makeshift compound, but it took police another day to find the girls because Shaffer had hidden them in the barrels and trailer, authorities said.

After he told police where to find them, the children were treated successfully for the effects of cold and symptoms of dehydration, police said.