TORONTO - A judge has ordered new trials for 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.

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.

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

Their lawyer James Lockyer described his clients -- who were 18 and 21 at the time -- as frightened young women who didn't know they were pregnant when they gave birth in the bathrooms of their homes. The babies either were stillborn or died a few minutes after birth.

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.

A judicial inquiry has since found the pathologist's work was responsible, in part, for several people being wrongfully convicted of killing children and sent to prison.

Lockyer told court Wednesday that the women's lawyers in the 1990s had trouble finding experts willing to challenge the "infallibility" of Smith's opinion.

"Doctor Smith's reputation preceded him," Lockyer said.

"Any challenger was bound to be viewed as a pretender."

M pleaded guilty to manslaughter, while F pleaded guilty to infanticide and has since been pardoned.

"I was ashamed of having brought turmoil to my family," Lockyer read from an affidavit from his client M.

"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 Justice Mark Rosenberg's decision to grant the new trials.

Rosenberg told Lockyer the court wanted to "acknowledge the suffering your clients have endured."