LOS ANGELES (AP) – A federal appeals court has overturned a California man’s assault conviction after he went to trial without undergoing a sleep study to bolster his contention that he was sleepwalking.

The 9th U.S. Circuit Court of Appeals said Friday the failure to have Yun Liao undergo a sleep test left his defense weak during his 2003 trial in Los Angeles County. The court cited a subsequent sleep study that determined Liao was a sleepwalker.

READ MORE: Family Asks For Potential Witnesses To Come Forward Following Deadly Stockton Hit-And-Run

Liao has served his time in prison and is now on parole. The 9th Circuit sent his case back to a lower court with instructions to release him from custody unless prosecutors decide to retry him.

An email to the Los Angeles County District Attorney’s office was not immediately returned.

READ MORE: Thousands Of Afghan Refugees Flee Kabul, Hundreds Land In Sacramento

Liao was accused of attacking his ex-girlfriend’s son with a hammer.


MORE NEWS: Footage Released Of Carjacking Suspect's Assault On Sacramento Sheriff's Deputy

Copyright 2016 The Associated Press.