Tears ran down Maria Shepherd's face as she embraced her lawyer in the moments after being exonerated.

More than two decades after Ms. Shepherd was convicted of manslaughter in the death of her three-year-old stepdaughter, Kasandra, a judge in Ontario's Court of Appeal has cleared her name, throwing out the guilty plea she had reluctantly made and delivering an acquittal.

It is another belated win for the victims of Charles Smith, the forensic pathologist whose medical opinions secured at least a dozen criminal convictions, including that of Ms. Shepherd, before his methods were discredited in 2007.

Story continues below advertisement

But even as she relished the vindication, Ms. Shepherd reflected on the pain of a lost child and a legal odyssey.

"As a family, we're elated," she said outside the Toronto courthouse, flanked by her husband and four children. "But this didn't come without 25 years of a lot of quiet tears and anguish at home."

In a brief hearing crowded with family and supporters, the Crown joined the defence in calling for an acquittal.

"This is a tragic case," Crown counsel Howard Leibovich said. "The flawed opinion of Dr. Smith fundamentally altered the investigation and prosecution of the case, and took it on a path it should not have gone. Kasandra deserved better. Her family deserved better, and of course the appellant deserved better. The Crown apologizes to all of them for this."

Ms. Shepherd's appeal hinged on fresh evidence showing that Mr. Smith had no grounds for his theory that Kasandra was killed by a blow to the head from a circular object matching the shape of her stepmother's watch.

The girl's death, preceded by a series of seizures on April 9, 1991, could have had natural causes, the defence argued.

Epilepsy ran in the family, according to court records, and Kasandra had recently been in hospital for a month because of a mysterious illness that caused frequent vomiting, and had lost a third of her body weight.

Story continues below advertisement

As well, medical experts retained by the defence and Crown now agree the watch theory was wrong.

Armed with that theory, and Mr. Smith's authority, police had accused Ms. Shepherd of killing the girl, and under pressure during interrogation, she told them she struck Kasandra with the back of her hand on the day the girl died.

She later recanted.

Ms. Shepherd's trial lawyer persuaded her to plead guilty because Mr. Smith's testimony in the preliminary hearing seemed "compelling" and "unassailable," according to an affidavit from the lawyer.

When the case went to trial in 1992, Mr. Smith was considered "all but untouchable," James Lockyer, who acted for Ms. Shepherd in Monday's proceedings, said in his final submissions.

Faced with the doctor's opinion, Ms. Shepherd's prospects of acquittal seemed dim.

Story continues below advertisement

In exchange for her plea, she received a reduced sentence – two years minus a day in a local, low-security facility instead of three to five years in the Kingston Penitentiary for Women – and an increased likelihood of regaining custody of her children.

Ms. Shepherd, who was pregnant with a daughter when she went to prison, said she pleaded guilty to preserve what was left of her family.

"We can in a sense be grateful that Ms. Shepherd did plead guilty," Mr. Lockyer said. "She did indeed keep her family together."

Ms. Shepherd's family has always maintained her innocence.

Jordan, her son from a previous relationship, called his mother a "hero" on Monday.

Ashley Shepherd, her husband and Kasandra's biological father, expressed relief that his wife's ordeal was over.

Story continues below advertisement

The Brampton, Ont., couple have been together for more than 25 years.

"I'm glad that there's a light at the end of the tunnel," he said.

Ms. Shepherd said she is looking forward to travelling abroad with her family – to "let them touch white sand, and see what a blue, blue sea is" – which the conviction had largely prevented.

But while she exulted in the judge's decision – "I'm free!" she said leaving the courtroom – Ms. Shepherd acknowledged a sense of loss and frustration no court can remedy.

"We're damaged as a family for life," she said. "There's nothing that could possibly give us back our 25 years. But we will do our best."