PITTSBURGH -- A woman charged with drowning her two youngest sons in their bathtub because she wanted to be a better mother to their older brother was found guilty but mentally ill of third-degree murder.

Allegheny County Judge Jeffrey Manning on Thursday found that Laurel Schlemmer’s mental capacity was diminished by her illness, meaning she couldn’t form the specific intent to kill that was required of the first-degree murder conviction prosecutors sought for the April 2014 killings.

Schlemmer faces as much as 20 to 40 years in prison on each third-degree murder count, but because she was found mentally ill, she’ll begin any sentence in a state mental hospital and then will be moved to prison if doctors ever deem her cured.

“It is my fervent hope that in the future, mental health treatment will bring you, Ms. Schlemmer, to the shocking realization of what you have done so that you will continue to be punished far beyond any sentence this court may impose,” Manning said.

Get Breaking News Delivered to Your Inbox

Defense attorney Michael Machen called the case “difficult and complex” and praised the judge for navigating the mental health issues that made the case a whydunit instead of a whodunit. Manning said in delivering the verdict that he was forced to “wrestle with some puzzling psychiatric issues.”

A friend of Schlemmer’s, Jenn Martino, handed out a brief statement on behalf of other friends.

“We do not condone or excuse what she did,” the statement said. “However, we want people to know she is not heartless, but rather a beloved child of God who sadly was suffering from mental illness in the form of depression and anxiety.”

Psychiatrists for the prosecution and defense testified that the 43-year-old Schlemmer became concerned that her two youngest sons were autistic and would never grow up normally even though a battery of tests she put them through showed no signs of the mental condition.

Schlemmer met her husband, Mark, on a Christian singles online dating site and told doctors she felt “pressured” to have more children as her husband opted not to use birth control for religious reasons.

She also had three miscarriages and considered her younger sons, who CBS affiliate KDKA reports were 3 and 6 at the time of their deaths, especially Daniel, 6, to be “foreign” to her and her husband and not as easy to raise as their oldest boy, who was 7 when his brothers were killed, said Dr. Bruce Wright, the prosecution’s doctor. She drowned the younger boys after taking the oldest son to a school bus stop on April 1, 2014.

Schlemmer had acknowledged trying to kill Luke and Daniel in April 2013 by tying their hands and feet with twine and backing over them with her car three times, but then claimed it was an accident. Police and social workers also determined it was an accident. But Schlemmer told her husband days before the drownings that she wanted to confess to that crime, but he talked her out of it, prosecutors said.

Mark Schlemmer attended last week’s trial testimony but was not in the courtroom for the verdict. Assistant District Attorney Lisa Pellegrini told the judge that Mark Schlemmer has repeatedly violated a court order that Laurel Schlemmer have no contact with their surviving son by bringing him to visit his mother while she was incarcerated.

Manning indicated Mark Schlemmer would be held in contempt of court if that continued.

Sentencing is scheduled for June 8.