TORONTO - Two women who say they felt pressured into pleading guilty to killing their babies based on the work of now disgraced pathologist Dr. Charles Smith will get new trials, a panel of judges ruled Wednesday.

Ontario's highest court quashed both convictions today and the Crown said it will withdraw charges once the new trials begin, meaning both women would be effectively acquitted.

Their names and hometowns cannot be identified due to a publication ban, but they were referred to in court by their last initials of F and M.

Their lawyer James Lockyer described his clients -- who were 18 and 21 at the time -- as "terrified" young students from respectable families who didn't know they were pregnant when they found themselves giving birth in the bathrooms of their homes.

The babies either were stillborn or died a few minutes after birth, said Lockyer.

F lost so much blood that she can't remember giving birth in 1996, Lockyer said. After her father took her to the hospital, police later discovered the baby girl's body wrapped in a towel and plastic bag in a closet.

In 1992, M's parents returned home to find their daughter in a pool of blood and the body of a baby boy in the toilet.

Lockyer argued the women felt they had no choice but to plead guilty due to Smith's stellar reputation at the time as a pediatric forensic pathologist.

"Both felt overwhelmed by the situation," Lockyer said ednesday. "Dr. Smith, after all, was the invincible icon."

An inquiry by Justice Stephen Goudge has since found that errors in the pathologist's work were responsible, in part, for several people being wrongfully convicted and sent to prison for killing children.

Lockyer told court Wednesday that the women's lawyers in the 1990s had trouble finding experts willing to challenge the belief of "infallibility" of Smith's opinion. Smith ruled the babies died of asphyxia. He had not even examined the body of Baby F.

In their decision, the panel judges said there was no evidence to support Smith's conclusion and that other pathologists found no definitive cause of death.

Faced with the prospect of jail time, M pleaded guilty to manslaughter, while F pleaded guilty to infanticide. Both avoided jail terms. F has since been pardoned.

"I was ashamed of having brought turmoil to my family," M said in an affidavit that Lockyer read in court.

"It seemed like the only thing to do was to plead guilty to manslaughter."

Only one of the two women was in the courtroom Wednesday. Lockyer hugged his client upon hearing the decision to grant the new trials.

Justice Marc Rosenberg said the cases were "very sad" and told Lockyer the court wanted to "acknowledge the suffering your clients have endured."

Lockyer said the new trials should start in the next few weeks and both his clients will no longer have criminal records.

"It's a huge relief. They've carried this for almost a decade, both of them," Lockyer said outside court.

"They went through an awful experience, and then it just got multiplied by the criminal charges that were laid as a result of Dr. Smith's wrong opinions."

The Crown said it thinks there would still be a reasonable prospect of conviction in M's case, but will reveal its reasons to withdraw the charges at trial.

At least two other people have seen their convictions overturned since a review done by a group of expert pathologists found errors in some of Smith's cases.

William Mullins Johnson was acquitted after serving 12 years in prison for rape and murder of his four-year-old niece. It was later determined the girl died of natural causes.

Sherry Sherret-Robinson was exonerated in December 2009 after living with the term "baby-killer" for 13 years. The Court of Appeal for Ontario acquitted her of infanticide and pronounced her wrongfully convicted.

Lockyer said he knows of at least five more cases linked to Smith's expert opinion that are still making their way through the appeals process.

This summer, the Ontario government announced that people who were wrongfully convicted or accused of killing children based in part on Smith's work are eligible to apply for up to $250,000 in compensation.