Updated

A Guatemalan immigrant who lost custody of her child after being caught-up in an immigration raid has regained parental rights.

The Missouri Supreme Court ruled Tuesday that state adoption laws were not followed in terminating the parental rights of a Guatemalan woman who was caught up in a 2007 immigration raid and allowing her son to be adopted by an American couple.

But the decision doesn't automatically return the now 4-year-old child to his birth mother, Encarnacion Bail Romero. The court instead ordered the completion of mandatory reports about Romero, the adoptive parents and the boy, and a new trial regarding Romero's parental rights.

Judge Patricia Breckenridge, who wrote the majority opinion for the seven-member court, said another hearing would be required because the evidence in the case suggested abandonment. In a footnote, Breckenridge expressed concern about how the case played out, and three other judges indicated they would have reversed the adoption.

"Every member of this court agrees that this case is a travesty in its egregious procedural errors, its long duration and its impact on mother, adoptive parents and, most importantly, child," Breckenridge wrote.

Romero was arrested during an immigration sweep at a poultry plant, and sentenced to two years in a federal prison after pleading guilty to aggravated identity theft. Since leaving prison in 2009, she has been seeking to regain custody of her son, Carlos, who has lived with Seth and Melinda Moser, of Carthage, since he was about 1 year old.

Another couple who had been helping Romero's family care for Carlos after his mother's arrest had contacted the Mosers about adopting him. The boy was born in the U.S. and is a U.S. citizen. Romero was not immediately deported after serving her sentence so she could challenge the adoption, according to her attorneys.

"Fundamentally, we're very pleased with the decision," said Chris Huck, a Seattle attorney who represented Romero.

Although he'd hoped a majority of the judges would have agreed to reunite the family, "we know in the retrial we're going to be able to demonstrate that there isn't any evidence of abandonment, let alone clear, cogent and convincing evidence of abandonment."

Joe Hensley, an attorney who represented the Mosers in the adoption, said the decision was the next best thing to the Supreme Court upholding the adoption. Hensley said the boy would remain with the Missouri couple until there could be an adoption proceeding.

"The main complaint, I guess, is there were a couple of reports that weren't filed, and so we'll get those reports and do it again," Hensley said.

The Mosers' attorneys argued that the court terminated Romero's parental rights after determining she had not tried to maintain contact or provide for the child. Romero's attorneys contend the mother never abandoned her son and was not given sufficient legal representation before losing custody. They asked the state Supreme Court to consider additional evidence about the quality of Romero's legal representation and whether the boy was abandoned.

"We're fundamentally disappointed that the court did not recognize the violation of the child's rights to his relationship with his mother," said Jennifer Nagda, associate director of the Immigrant Child Advocacy project at the University of Chicago, which submitted a brief in the case.

"I think there's a real danger in beginning the procedures anew," she said. "(A new trial) may skew in favor of the existing relationship between the putative adoptive parents as opposed to the constitutionally protected relationship between a parent and child."

The court's judges were mixed about the case. In a separate opinion, three judges said they would have reversed the adoption without a hearing, except to determine how to transition the boy back to Romero's custody, because there was not clear evidence that Romero abandoned her son.

"Repeated, open, obvious and evident errors, combined with the ineffective assistance of counsel, set the stage for the factually erroneous judgment depriving the mother of her relationship with her son," Judge Laura Denvir Stith wrote.

The case has generated widespread interest. The Guatemalan consulate, the American Civil Liberties Union and several other groups submitted written arguments to the state Supreme Court. Guatemala's ambassador to the U.S., Francisco Villagran, watched the November oral arguments and sat near Romero in the courtroom. He said later that the dispute was the result of unclear American immigration rules.

John De Leon, a lawyer for the Guatemalan foreign ministry, praised Tuesday's decision but said his office had hoped that there would be no need for further court proceedings.

"The court has recognized that immigrants have rights, the same rights as anyone else, to raise their children," he said.

Tony Rothert, legal director for the American Civil Liberties Union of Eastern Missouri, said he was confident that Romero would keep her parental rights if all the facts of the case were considered.

"She is the parent again, but this decision allows them to try once again to terminate her parental rights," Rothert said. "The fact that she's now out of jail and represented by counsel, I think I'd be very surprised if they (terminate her rights). But one never knows."

The Associated Press contributed to this article.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino