The US state of Texas overstepped its authority when it removed some of 460 children from a polygamist compound last month, an appeals court has ruled.
The ruling is the latest twist in an unfolding saga that has riveted Texas with lurid tales of adolescent brides, teen pregnancies and a secretive religious sect following its faith in the state.
Texas Child Protective Services and heavily armed police units last month raided the isolated compound in west Texas and removed the children in response to allegations of abuse.
But the appeals court said that the state had not proven that the children were in immediate physical danger, and therefore were improperly separated from their parents.
While the opinion covers the children of only 48 mothers, a lawyer told reporters that the ruling will likely apply to all of the children, most of whom are in foster homes across the state.
The appeals court opinion gives a lower court, which initially approved the state's actions, 10 days to act.
The compound is run by followers of jailed polygamist leader Warren Jeffs. They belong to a renegade Mormon sect known as the Fundamentalist Church of Jesus Christ of Latter-Day Saints.
The mainstream Church of Jesus Christ of Latter-day Saints renounced polygamy over a century ago and is at pains to distance itself from splinter groups such as the FLDS that continue to practice plural marriage.
FLDS men typically marry one legal wife while those who follow are ‘spiritual wives.’ This makes those women single in the eyes of the state that can entitle them and their children to various welfare benefits.
FLDS communities usually keep to themselves and lead austere lifestyles. The girls and women wear 19th century-style pioneer dresses and are taught from an early age to obey men.
A Texas court has announced that all children taken from the Fundamentalist Church of Jesus Christ of Latter-Day Saints (FLDS) compound in Texas are being returned to their parents. Beginning today, parents have been allowed to collect their children, all of whom were in state custody before the announcement.

The more than 460 allegedly abused children were taken into state custody last month after officials say they received a call from a distressed 16-year old girl. The children were found in a 1700-acre compound belonging to the FLDS. It is now believed that the original phone call was actually a hoax.

YFZ Ranch near Eldorado, Texas, owned by the Fundamentalist Church of Jesus Christ of Latter Day Saints.
The decision follows an appeals court ruling that Texas Child Protective Services (CPS) should not have taken the children from the FLDS.

Recently the CPS in Texas filed papers on this issue, saying that the families may choose to flee Texas if they are reunited per the appeals courts ruling. If the families were to do that, they would then be outside the court's jurisdiction, putting the children at risk of abuse.

The CPS in Texas released a statement regarding the court ruling: "We are disappointed, but we understand and respect the court's decision and will take immediate steps to comply. Child Protective Services has one purpose in this case - to protect the children. Our goal is to reunite families whenever we can do so and make sure the children will be safe. We will continue to prepare for the prompt and orderly reunification of these children with their families. We also will work with the district court to ensure the safety of the children and that all of our actions conform with the decision of the Texas Supreme Court."