The Yearning for Zion ranch belongs to a breakaway Mormon sect
The US judge deciding the fate of 416 children removed from a breakaway Mormon sect has struggled to control a first chaotic day of custody hearings.
Judge Barbara Walther had to suspend proceedings for an hour to allow hundreds of lawyers for the children and their parents to view evidence.
Lawyers were arguing whether the Texas case violated religious freedom rights.
Police raided the ranch last week after receiving reports that a 16-year-old girl had been sexually abused.
The courtroom in San Angelo was packed with members of the Yearning for Zion religious sect, including many of the children's mothers, who wore distinctive long pastel dresses.
More than 300 lawyers crammed into additional rooms, in what is reportedly the largest child welfare case in US history.
The judge said her primary task was to establish whether the children should be returned to their parents or remain in the care of the Texan authorities.
"The court is not in the position and certainly does not intend to rule about someone's religious practices and their freedom of religion," said Judge Walther.
Detectives had raided the ranch after a 16-year-old girl called an abuse hotline saying she had been beaten and raped by her 50-year-old husband.
Sect members believe men must have at least three wives to get to heaven
As a result of the raid, all children on the ranch aged between six months and 17 years of age were placed in emergency state custody.
Texas law states that if sexual abuse is happening in a home and a parent does not put a stop to it, then the parent can lose custody of the child.
One of the judge's tasks is to determine whether or not the ranch constitutes a "home" under state law.
In making her judgement, she may also weigh up the dangers of placing children who have grown up in such an isolated location into mainstream society.
The unprecedented size of the case is also putting pressure on the state's child services division, and if the state is granted permanent custody of the children, it will have difficulty finding foster homes for all of them.
Except for 27 adolescent boys, all of the children are being held in a domed coliseum on land used for the San Angelo state fair.
The Yearning for Zion ranch belongs to a breakaway Mormon sect called the Fundamentalist Church of Jesus Christ of Latter Day Saints.
Warren Jeffs was on the FBI's most wanted while on the run
The sect is led by polygamist Warren Jeffs, who is currently in jail as an accomplice to rape after he forced a 14-year-old girl to marry her cousin.
The self-proclaimed prophet is currently awaiting trial in Arizona on charges of being an accomplice to four counts of incest and sexual conduct with a minor stemming from two arranged marriages.
Members of the sect have denied the latest allegations of abuse.
"It's the furthest thing away from what we do here," said Dan, a sect member.
"There's nothing that's more disliked and more trained against," he added.
The 10,000-strong sect, which dominates the towns of Colorado City in Arizona, and Hildale, Utah, split from the mainstream Mormon church more than a century ago.
Members believe a man must marry at least three wives in order to ascend to heaven.
Women are meanwhile taught that their path to heaven depends on being subservient to their husband.
Polygamy is illegal in the US, but the authorities have reportedly been reluctant to confront the FLDS for fear of sparking a tragedy similar to the 1993 siege of the Branch Davidian sect in Waco, Texas, which led to the deaths of about 80 members.