HOUSTON -- Andrea Yates's murder conviction for drowning her five children in the bathtub was overturned yesterday by an appeals court because a psychiatrist for the prosecution gave erroneous testimony that suggested the Texas mother got the idea from an episode of ''Law & Order."
The ruling means Yates is entitled to a new trial, though prosecutors said they would try to have the conviction reinstated.
Yates, 40, is more than two years into a life sentence after a trial that stirred national debate over mothers who kill, postpartum depression, and the legal definition of insanity.
The key to the appeals court ruling was the testimony of Dr. Park Dietz, a forensic psychiatrist who consulted for ''Law & Order" and had helped prosecutors land a conviction in 2002. Dietz testified at the trial that shortly before Yates's crime occurred, ''Law & Order" ran an episode about a woman who drowned her children and was found innocent by reason of insanity.
But it turned out that no such ''Law & Order" episode existed.
''We conclude that there is a reasonable likelihood that Dr. Dietz's false testimony could have affected the judgment of the jury," a three-judge panel of the First Texas Court of Appeals said.
A receptionist at Dietz's office in Newport Beach, Calif., said yesterday that neither Dietz nor his firm had an immediate comment on the ruling. In its ruling, the court noted that Dietz ''acknowledged that he had made an error in his testimony."
On June 20, 2001, Yates drowned her five children one by one, then called police to her Houston home and showed them the bodies of Noah, 7, John, 5, Paul, 3, Luke, 2, and 6-month-old Mary.
Yates pleaded insanity, and according to testimony at the trial, she was overwhelmed by motherhood, considered herself a bad mother, suffered postpartum depression, had attempted suicide, and had been hospitalized for depression.
Five mental health experts for the defense testified that she did not know right from wrong or that she thought what she did was right.
Dietz, a nationally known authority who took part in the Jeffrey Dahmer and Unabomber cases, was the lone mental health expert to testify for the prosecution, and the only one to say she knew right from wrong. Ultimately, the jury rejected her claim of insanity.
''His testimony was critical to establish the state's case," the appeals court said. ''Although the record does not show that Dr. Dietz intentionally lied in his testimony, his false testimony undoubtedly gave greater weight to his opinion."
In his testimony, Dietz said he consulted for the popular NBC series, and added: ''As a matter of fact, there was a show of a woman with postpartum depression who drowned her children in the bathtub and was found insane and it was aired shortly before the crime occurred."
The error in Dietz's testimony became known to prosecutors and jurors before the sentencing phase in 2002. The defense asked for a mistrial because of it, but the judge refused. The jury ultimately spared her from the death penalty.
The appeals court absolved the prosecutors of any wrongdoing.
Yates was thrilled by the news after learning of the ruling at the psychiatric prison where she is serving her sentence.
''She smiled and said she was basically just kind of in shock," said Todd Foxworth, warden at the Texas Department of Criminal Justice Skyview Unit. ''But she was very happy. Physically and mentally, she's doing as well as I've ever seen her."
Defense attorney George Parnham said he had no plans to seek her release from the prison about 140 miles north of Houston, where she works in the flower garden and has janitorial duties.
''Andrea is where she needs to be right now, as far as security is concerned for her," he said. ''The last thing Andrea needs, quite frankly from my perspective, is to walk from the TDCJ Skyview Unit into the public arena."