DOHA, Qatar — An American couple charged with starving to death their adopted daughter was allowed to leave a Qatar jail on Wednesday as they pursue their legal battle, insisting their African-born child died of medical problems complicated by anorexia-like bouts.

The case has brought assistance from U.S.-based groups and highlights possible cultural misunderstandings in a Gulf nation unfamiliar with adoption and cross-cultural families.

The decision by Judge Abdullah al-Emady to free from Matthew and Grace Huang from detention reversed his orders last month to keep them in custody during the trial. The couple was not required to post bail but cannot leave Qatar. The next hearing was scheduled for Dec. 3.

The ruling followed a string of defense witnesses who testified that 8-year-old Gloria appeared healthy and active just days before her death in January. Prosecutors allege the couple denied food to their daughter, who was born in Ghana and adopted at age 4. They also claim she was locked in her room at night.

The couple moved to Qatar from California in 2012, after Matthew Huang took a job on water projects related to infrastructure improvements for Qatar's hosting of the World Cup in 2022.

The couple says the girl had various medical problems and also erratic eating habits, including periods of binging and self-starvation. They say she was not allowed from her room at night because of bizarre behavior during eating sprees, including rummaging through garbage for food.

Officials in Qatar also have raised questions about the adoption procedures in Huangs' case, including payments to an adoption agency. This is likely because adoption is virtually unknown in traditional Gulf Arab societies, where extended families would provide care.

In addition, an investigative report by Qatari police raised questions about why the Huangs would adopt children who did not share their "hereditary traits" and raised concerns that the children were part of a human trafficking operation or were "bought" for organ harvesting, according to the family's website.

The couple has two other children adopted from Africa. The children left Qatar last month to live with relatives in the U.S.