When more than 400 children were taken from the Yearning for Zion Ranch in west Texas, the full glare of the world's media fell on the Fundamentalist Church of Latter Day Saints.
Members of the splinter sect of the Mormon church live on a huge reclusive ranch, and they are polygamous, believing the practice is a way to get to heaven.
Sect members believe men must have at least three wives to get to heaven
The Mormon church officially abandoned polygamy more than a century ago.
The sect members' isolated way of life was shattered in early April when Texas welfare officials removed the 430 children - half of them under the age of five - citing systemic sexual abuse.
They specifically alleged that girls were being "groomed" to have sex with their middle-aged "spiritual husbands".
Since then, welfare officials have struggled to house the children in foster care and also battled to come up with enough evidence to press charges over the allegations.
Now a Texas court has dealt the investigation a major blow, ordering that the children be reunited with their parents, although it remains unclear how many will return to the ranch in the coming days, as many of the women in the group appeared to quit the ranch voluntarily after the raids.
The ruling upheld a lower court ruling that the children were not in immediate danger.
Last week, the courts found the state could not prove that more than five of the teenage girls were being abused and had offered no evidence of physical or sexual abuse against the other children.
Two of the children in foster care have given birth in the last two months, and some of the other girls have been reclassified as adults after being initially held as minors.
Insular lives
Despite the legal setback, authorities say the investigation will continue and the parents will have to abide by other rulings made by the judge.
Advertisement
US reporter Paul Anthony on the biggest child custody case in US history
The parents will not be allowed to leave the state of Texas, they will be made to co-operate with the investigation and will be forced to take parenting classes.
They were also ordered not to interfere with any ongoing child abuse investigations and to allow the children to undergo psychiatric and medical exams if required.
Willie Jessop, an elder for the Fundamentalist Church of Jesus Christ of Latter Day Saints, said: "We're really grateful to get the order signed."
It is believed that their two months in care will have taken a toll on the children, who are used to an insular lifestyle on the self-contained ranch.
The ranch members believe they are being persecuted for their religious beliefs and claim that no sexual or physical abuse has taken place.
The compound is run by followers of jailed polygamist leader Warren Jeffs, which will likely ensure that Texan authorities pursue the charges to the bitter end.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.
Bookmark with:
What are these?