(CNN) -- Child welfare officials have agreed to return 12 children taken from a polygamist sect's ranch to their parents while the courts weigh hundreds of other cases, a family spokeswoman said Friday.
An FLDS family waits at the San Antonio, Texas, courthouse for a reunion with a seized child.
Some of the children were reunited with their parents shortly after the agreement, which came after a hearing in San Antonio, said Rene Haas, a lawyer representing Joseph Steed Jessop Sr. and his wife, Lori. The Jessops' three children were among those released.
Under the agreement, the children must stay in the county under state supervision until the Texas Supreme Court weighs in on the massive custody case that began April 3, when authorities raided the Yearning For Zion Ranch in Eldorado.
It was unclear whether the agreement reached in San Antonio would apply to families of the more than 400 other children taken in the raid, which Haas called "a huge mistake" for the state.
"I think that CPS does not want to give any of these children back, and that makes me very sorrowful as a mother and a grandmother," she said. "These children now need to go back to their parents immediately."
Authorities removed more than 400 children from the ranch, which is owned by the Fundamentalist Church of Jesus Christ of Latter Day Saints, based on reports that minors possibly were being sexually abused.
Officials with Texas Child Protective Services said they found a "pervasive pattern of sexual abuse that puts every child at the ranch at risk."
On Thursday, the 3rd District Court of Appeals court ruled that the department failed to prove there was an urgent need to remove the children and that it was wrong to extend the abuse allegations to the entire community.
The state of Texas appealed that ruling Friday, arguing that the appeals court overstepped its bounds by ruling that the state erred in taking emergency custody of the children.
In its 27-page appeal, the department said the appeals court's role is merely to determine whether a lower court abused its discretion rather than reconsider the evidence and second-guess the lower court's decision.
"The appellate court cannot concern itself with the burden of proof or conduct a legal or factual sufficiency review," the state wrote in its appeal.
The appeal also stated that "this case is about adult men commanding sex from underage children; about adult women knowingly condoning and allowing sexual abuse of underage children; about the need for the department to take action under difficult, time-sensitive and unprecedented circumstances to protect children on an emergency basis ... and about the intermediate court's mandate to return the children without giving the court the opportunity to determine which parents are entitled to possession of which children."
In response, lawyers for the 38 women who challenged the children's placements in temporary state custody said the children face "continuing, irreparable harm every day that they are separated from their parents."
They argued that local courts can ensure the safety of the children and called the state's claims that it had been unable to figure out which children belong to which mothers a "red herring."
"The matching of children with parents did not become a problem for the department until a court decided that it had to give the children back," the lawyers wrote. "The department's claim of ignorance strains credulity."
If the state's Supreme Court appeal fails, a permanent reunion of families is assured, said Jeffrey Toobin, CNN senior legal analyst.
"I think it's clear that if [Thursday's ruling] stands, all these kids are going back with their mothers," Toobin said on CNN's "Anderson Cooper 360°."
A sect mother who has four children in state custody said Thursday that the possibility of an appeal kept her from celebrating too much.
"I'm very grateful, but I'd like to see the children in my arms before I rejoice greatly," Margaret Jessop said on CNN's "Larry King Live." Watch Jessop react to the ruling »
Jessop and other FLDS parents said they had been permitted regular visits with their children in state custody.
Zavenda Young said two of her children were sent to Waco, Texas, and two to Hockley, 148 miles away.
"They're in Boys and Girls Country in Hockley. And it's just a -- it's an institution," she told host Larry King.
Their father, Edson Jessop, said the experience has been rough on the children.
"You can see it's a lot of stress on them," he said. "Every time we leave, they go through that trauma again. It's enough to rip your heart out."
"They feel betrayed by adults, and they're hurting very badly," Margaret Jessop added.
The Texas Child Protective Services Department's Web site says the agency has been "coordinating with many professional service and government agencies to ensure the safety, health and comfort of the children and women in Eldorado."
A statement from the agency Thursday said it did the right thing when it raided the ranch.
"Child Protective Services has one duty: to protect children," the statement said. "When we see evidence that children have been sexually abused and remain at risk of further abuse, we will act."
All About Fundamentalist Church of Jesus Christ of Latter Day Saints