But the appeals court said the state acted too hastily in sweeping up all the children and taking them away on an emergency basis without going to court first.
"Even if one views the FLDS belief system as creating a danger of sexual abuse by grooming boys to be perpetrators of sexual abuse and raising girls to be victims of sexual abuse … there is no evidence that this danger is 'immediate' or 'urgent'," the court said.
"Evidence that children raised in this particular environment may someday have their physical health and safety threatened is not evidence that the danger is imminent enough to warrant invoking the extreme measure of immediate removal."
The court said the state failed to show that any more than five of the teenage girls were being sexually abused, and offered no evidence of sexual or physical abuse against the other children. Half the youngsters taken from the ranch were 5 or younger. Only a few dozen are teenage girls.
The court also said the state was wrong to consider the entire ranch as a single household and to seize all the children on the grounds that some parents in the home might be abusers.