SAN ANGELO, Texas (CNN) -- The state of Texas should not have removed children from a polygamist sect's ranch because it didn't prove that they were in "imminent danger," an appeals court ruled Thursday.

Photos from a Web site launched by the sect show scenes during and after the raid of their ranch.

In the ruling, a three-judge panel did not order that the children be returned to their families on the Yearning for Zion Ranch in Eldorado, Texas.

Instead, the judges gave the lower court 10 days to vacate an order placing the children in state custody.

"The existence of the FLDS belief system as described by the department's witnesses, by itself, does not put children of FLDS parents in physical danger," the judges said.

More than 450 children were removed from their homes last month on the Yearning for Zion Ranch, which is owned by the Fundamentalist Church of Jesus Christ of Latter-Day Saints, a Mormon offshoot that practices polygamy.

In its ruling, the Texas 3rd District Court of Appeals decided in favor of 38 women who had appealed a lower court judge's decision that the children remain in state custody.

Although the ruling applies only to the children of the 38 mothers represented in this case, a lawyer for the women said the Court of Appeals' reasoning would apply to all of the children who were removed from their homes.

"It is a great day for families in the state of Texas," said Julie Balovich of Texas RioGrande Legal Aid. Watch Balovich and the FLDS mothers react to the ruling »

Members of the YFZ community said they were "extremely grateful" for the court's ruling, but acknowledged the long road ahead.

The state can still appeal the decision or renew the investigation.

"I'd like to see the children in my arms before I rejoice greatly," said Maggie Jessop, who has two girls and two boys in state custody across Texas.

Jessop told CNN's Larry King that the experience had traumatized her children, whom she has visited several times since they went into foster care.

"They feel betrayed by adults, and they're hurting very badly," Jessop said.

The parents said they had spent the last few weeks zigzagging across the state to visit their children, who were taken from the sprawling 1,700-acre ranch on April 3.

"You can see it's a lot of stress on them," Edson Jessop said, referring to his three boys and girl. "Every time we leave, they go through that trauma again. It's enough to rip your heart out."

State officials told CNN they were reviewing the ruling.

"We are trying to assess the impact this may have on our case and what our next steps will be," child welfare spokesman Patrick Crimmins said in a written statement.

"Our office is confident that [the] state's lawyers will review the appropriate next steps in this case to ensure the safety and welfare of the children involved," Krista Piferrer, spokesman for Texas Gov. Rick Perry, said in a written statement.

The law grants the Texas Department of Family and Protective Services the authority to take emergency possession of a child if authorities have reason to suspect that there is an "immediate danger to the physical health or safety," warranting their immediate removal.

According to the ruling, the department obtained an emergency order to take custody of the children based on reports from a hot line caller who said she had been raped and impregnated on the ranch.

The girl, who claimed to be 16, reported that she had an 8-month-old baby and was pregnant again, and that she was married to Dale Barlow, who abused her physically and sexually.

Lawyers for the 38 mothers said authorities used those allegations to draw broader inferences about the practices and beliefs of all the sect members.

After interviewing five minors who were or had been pregnant, CPS removed all of the children, based on the assumption that the community's belief system allowed minor females to marry and bear children, lawyers for the women argued.

"The department's lead investigator was of the opinion that due to the 'pervasive belief system' of the FLDS, the male children are groomed to be perpetrators of sexual abuse and the girls are raised to be victims of sexual abuse," the ruling noted. Watch CNN's Sunny Hostin explain the ruling »

After the state took custody of the children, the mothers appealed the order on the grounds the department failed to establish that the need for protection was urgent.

Because no such proof was presented, the mothers argued that the district court, which backed the raid, abused its discretion and was obligated to return the children to their parents.

The appeals panel agreed.

"Evidence that children raised in this particular environment may someday have their physical health and safety threatened is not evidence that the danger is imminent enough to warrant invoking the extreme measure of immediate removal prior to full litigation of the issue," the panel wrote. Watch how the ruling favors FLDS »

Furthermore, the court said, CPS did not make any reasonable effort to determine if measures other than removal would have reduced the perceived risk to the children.

Outside the courthouse, Balovich said it was "ridiculous" how the courts had ignored the parents' rights.

"It was about time a court stood up and said that what has been happening to these families is wrong," she said.

Surrounded by the FLDS mothers represented in the case, Balovich said authorities considered the YFZ Ranch one household, an assertion with which the appeals court did not agree.

Therefore, proving that there was abuse in one household did not mean the state could apply that behavior to the entire ranch.

"This was the right decision," Balovich said, adding that she and her clients are "ecstatic about this news."

The ruling noted other deficiencies in the Department's investigation.

The authenticity of the initial abuse reports that turned authorities' attention on the ranch is in question, the court noted in its ruling.

Police have alleged that a family shelter crisis line received multiple calls March 29 and 30 from a caller claiming to be Sarah Jessop Barlow, age 16.

At least one of the telephones used by "Sarah Barlow" has been traced to a Colorado woman. Police say Rozita Swinton is a person of interest in connection with the reports of abuse at the ranch, but she has not been charged. She does, however, face a charge of providing a false report to authorities in a Colorado case.

Court hearings in the FLDS case resumed Monday, with hearings in several courtrooms to accommodate lawyers for the children. The hearings were held so the parties could review "family service plans" dictating the parameters under which FLDS parents can regain custody of their children.

FLDS members have denied any physical or sexual abuse takes place, and maintain they are being persecuted for their religious beliefs.

The sect's leader, Warren Jeffs, is in a Utah prison after being convicted on charges of being an accomplice to rape in connection with a marriage he performed in 2001. Jeffs also faces trial in Arizona on charges stemming from arranged marriages involving FLDS teens.

All About Fundamentalist Church of Jesus Christ of Latter Day Saints