SAN ANGELO, Texas (CNN) -- Hundreds of children who were taken from a polygamist ranch by Texas child welfare authorities will remain in state custody, a judge ruled Friday night.

Judge Barbara Walther also ordered court DNA testing for all 416 children who lived at the YFZ (Yearning For Zion) Ranch in Eldorado to determine their biological parents.

The compound is run by the Fundamentalist Church of Jesus Christ of Latter-day Saints -- a Mormon offshoot that practices polygamy.

Walther made her ruling after two days of testimony at a hearing to determine whether the children were properly removed by child welfare authorities.

Walther said she found sufficient evidence for Texas Child Protective Services to keep custody of the children.

Officials are now looking for "the very best temporary placements for these children," said Marleigh Meisner, CPS spokeswoman.

"This is not about religion -- this is about keeping children safe from abuse," she added.

An attorney representing some of the children said he planned to appeal the ruling.

"We're a little disappointed in what the process turned out to be," said Cody Towns.

The ranch raid stemmed from a series of phone calls in late March from a 16-year-old officials referred to as Sarah, who said she had been beaten and forced to become the "spiritual" wife to an adult man.

Don't Miss

FLDS members have denied that the girl, supposedly named Sarah Jessop Barlow, exists. Authorities have been trying to locate her, but have been unable to identify the girl.

Texas Rangers said Friday they are pursuing a Colorado woman as a "person of interest" regarding the phone calls that touched off the raid. Authorities said a search of the home of Rozita Swinton, 33, resulted in evidence that may link her to phone calls made about the YFZ ranch.

Earlier in the day, a defense witness testified that it is uncommon for a polygamist sect to force girls as young as 13 into marriage, as the state alleged.

Religious scholar John Walsh also addressed a particularly damning piece of evidence: At least one bed found inside a temple that was allegedly used to consummate such marriages immediately after the ceremony.

"Historically, the only use of a bed in a temple is for temple worship itself," said Walsh, who said he has studied the FLDS practices for 18 years. "The worship lasts a couple of hours, so all the temples will have a place where someone can lie down."

But, he said, "To my knowledge, there has never been any sexual activity in a Mormon temple."

Walsh said he also studies the mainstream Mormon church, which renounced polygamy a century ago and has no ties to the FLDS. He said without the polygamy aspect, the FLDS would resemble the Baptist or Catholic religions.

Walsh was followed to the stand by FLDS member Marilyn Jeffs, who said she was not forced into marriage before age 18. It wasn't clear whether Jeffs is related to jailed FLDS leader Warren Steed Jeffs.

Another FLDS woman, Maureen Jessop, said she was a mother of two toddlers and an infant, but also was trained as an emergency medical technician -- despite her husband's wishes. Jessop said she is a stay-at-home mother by choice. "I have a wonderful life in Eldorado," she testified.

Also testifying Friday was child psychiatrist and state witness Bruce Perry, who said FLDS children are taught that disobeying orders leads to eternal damnation and have little opportunity to learn how to make independent choices.

Young children are not mature enough to enter into a sexual relationship or a marriage, he added.

Perry, who has worked with families in groups such as the Branch Davidian sect near Waco, Texas, said that if the children are allowed to remain in state custody, "There have to be exceptional elements in place for these children and their families. The traditional foster care would not be good for these children."

The state had the burden of demonstrating to Walther why removing the children was necessary.

In court Thursday, Texas state officials presented records they said show 10 women were either married or pregnant as minors. The list was found during the raid, locked in a safe at a main ranch office building, the officials said.E-mail to a friend

CNN's Ismael Estrada and Katherine Wojtecki contributed to this report.