A Qatari appeals court has overturned a ruling against American couple Matthew and Grace Huang over the death of their adopted daughter.

The ruling Sunday is likely to end a legal saga for the Los Angeles couple, who were originally jailed on murder charges following the January 2013 death of their adopted daughter Gloria. They were found guilty of child endangerment and sentenced to three years in prison in March of this year.

They were allowed to remain free on bail pending their appeal but could not leave the oil and gas-rich Gulf nation.