An Ontario mother who spent nearly 14 years in prison for killing her son had her conviction quashed on Thursday because of flawed evidence that helped convict her.

Tammy Marquardt, of Oshawa, Ont., had been convicted in 1995 for the death of her two-year-old son Kenneth.

The conviction was based on evidence presented by disgraced pathologist Charles Smith, who has since been stripped of his medical licence.

On Thursday, both Crown and prosecutors agreed with Ontario's top court to overturn the conviction and order a new trial.

The court heard that Smith made serious mistakes when he concluded the boy had been strangled or smothered to death. Smith had dismissed the possibility that the child could have died suddenly due to epilepsy. New evidence suggests the child had a history of epilepsy.

Marquardt, 38, has always maintained her innocence.

"The nightmare is finally coming to an end and I am waking up," Marquardt told reporters outside of court on Thursday. "I've got a big wish list of what I want to do. Skydiving; if all goes as planning I will go skydiving this summer. And then I will physically be able to feel that freedom."

There is no word on when Marquardt's case could return to court. Some cases previously overturned based on Smith's flawed testimony have never been re-tried.

Doreen Alamaras said it was an amazing feeling to finally have her daughter-in-law out of prison.

"We know where we are now and we can go from here. It has been one day at a time, it has been hard. But soon it will be all over, and it is going to be a great outcome," she said.

Smith was stripped of his medical licence by a disciplinary committee, after pleading "no contest" to charges of disgraceful conduct earlier this month.

In 2005, Ontario's chief coroner ordered a review of 44 autopsies Smith had conducted. The review determined that Smith had made errors in 20 child autopsies, 13 of them resulting in criminal charges.

William Mullins-Johnson was exonerated after spending 12 years in jail for the rape and murder of his four-year-old niece. Smith apologized to Mullins-Johnson and the Ontario government later paid him $4.25 million in compensation.