(CNN) -- The boy has two names.

His biological mother calls him Carlitos, but he's Jamison to the couple that adopted him.

The two sides are locked in a heart-wrenching legal fight over custody of the 4-year-old boy. He's caught between federal immigration and state adoption laws -- and between two families. But the Missouri Supreme Court will soon decide his fate.

The court could keep him with his adoptive parents, Seth and Melinda Moser, a couple from Carthage, Missouri, who have raised the boy since shortly before his second birthday. The Mosers say they played by the rules in adopting the boy and have provided him with a loving, stable home.

Or the court could return the boy to his biological mother, a native of Guatemala who says she never agreed to her son's adoption. She was separated from her son when he was about 6 months old after federal agents imprisoned her as an illegal immigrant who used a stolen Social Security number to work at a poultry processing plant.

Seth Moser says he and his wife are the only parents the boy has ever known. They heard him speak his first words and watched him take his first steps.

"God has given us a little boy and the responsibility of taking care of him and loving him, and that's all we've done since the first day we've had him," he says.

"It's almost like preparing for someone in your family to die," he says. "How do you explain to your 4-year-old that there's an issue and that he has to go with this other person he doesn't even know?"

The boy speaks English, like the Mosers. His biological mother, Encarnacion Bail Romero, speaks Spanish.

She didn't see her son during her nearly two years behind bars, but the boy is her flesh and blood, she argues. She says her child was taken away without her consent. How can a court not allow her to get her child back, she asks?

"I was very worried about my son, and today I'm still desperate," she says in Spanish. "I want to be with my son."

The federal government plans to deport Bail Romero to Guatemala, where her two other children live, but authorities have put the process on hold until the courts resolve the question of her son's custody.

Lurking behind the immediate issue of where the boy will live is the larger question of what happens to children when their parents are detained as illegal immigrants.

There may be hundreds or thousands of cases in the United States where immigrant children are taken from their biological parents, says Marcia Zug, a University of South Carolina law professor who has researched the topic.

Because records of many such cases are sealed, and because many immigrants can't afford to hire lawyers, Zug estimates that she has found only a small fraction of such cases.

"I have 20 documented cases, but I think that's just the tip of the iceberg," she says.

In some cases, state welfare workers facilitate the adoption of illegal immigrants' children, acting on what they believe to be the children's best interest, she says. That motivation resonates with the Mosers, who wonder what kind of future would await in Guatemala for a boy who speaks no Spanish.

The Missouri Supreme Court could rule any day on the legality of the boy's adoption; a lower court has ruled that the adoption was invalid.

"No one knows for sure how many have lost their kids because of immigration issues," says Bail Romero's attorney, Omar Riojas.

The path that took the boy from Bail Romero to the Mosers has enough twists and turns that one of the attorneys involved in the case compared it to a soap opera.

The story begins about six months after Bail Romero gave birth.

In May 2007, federal immigration agents raided the poultry processing plant where Bail Romero worked. Rather than deport her, the government charged her with aggravated identity fraud for working under a stolen Social Security number.

With Bail Romero in prison, her brother and sister cared for the boy, at first. They sought help in caring for the child from an education worker who put them in touch with a clergy couple who offered babysitting services, attorneys in the case say.

The couple asked to adopt the boy, but Bail Romero said no, Riojas says. Rebuffed, the couple introduced the boy to the Mosers. The clergy couple eventually put the boy up for adoption -- something the boy's biological mother says they lacked the legal ability to do.

The Mosers soon asked a judge for temporary custody, says their lawyer, Richard Schnake. Bail Romero -- in prison at the time -- did not contact the Mosers or their attorney or object to them having custody, he says.

"I didn't know who that family was," she says.

Bail Romero says she did not fully understand what was going on and certainly did not give her blessing for them to adopt her son.

After a judge granted the Mosers temporary custody, they waited a year -- rather than the six-month minimum stipulated by Missouri law -- before asking to adopt the boy, Schnake says.

In October 2008, a judge approved the adoption, ruling that Bail Romero had abandoned her child by not trying to contact the Mosers for a year. Bail Romero says that's because she doesn't speak English and was left with no way to ask for help to plead her side.

In addition to the clergy couple not having the authority to put up her son for adoption, Riojas has argued that Bail Romero was deprived of due process because she had no consular access or access to legal documents in her language. He also says an attorney who represented her at one point did not represent her well.

After the adoption went through, the Mosers legally changed the boy's name to Carlos Jamison Moser.

In February 2009, however, Bail Romero got out of prison and started fighting to regain custody. An appeals court sided with her in July. It concluded that the adoption was invalid.

The Missouri high court heard arguments in the case in November.