An Ohio woman accused of suffocating her three sons due to jealousy at the attention they received from her husband-- who was also her mother’s ex-boyfriend-- pleaded guilty Tuesday to the boys’ deaths and received a 37-year prison sentence.

Brittany Pilkington was scheduled for trial next year in Bellefontaine, Ohio but since she pleaded guilty to involuntary manslaughter and murder, she removed the possibility of being sentenced to death.

Pilkington, 27, originally was charged with murder of 4-month-old Niall in 2014, 4-year-old Gavin in April 2015 and 3-month old Noah in August 2015. In a taped confession from the day Noah died, Pilkington said she’d smothered the boys with their own blankets because they received more attention from her then husband Joseph Pilkington than she and the couple’s daughter did.

Joe Pilkington had been at work at the time of all three deaths and had come home to find another one of his sons dead.

'LET THE BABY DIE' SIGNS TARGET FAMILY WITH SICK INFANT: REPORT

Noah died less than a week after he was returned from protective custody on a judge’s order. Authorities didn’t have any evidence of a crime in the deaths of the first two children, and no one could have predicted the remaining son would die, according to prosecutors.

The couple’s 8-year-old daughter Hailey was unharmed and is now being raised by her aunt and uncle, Dave and Judy Grimes.

OHIO MAN CHARGED IN HIGH SCHOOL STUDENTS' OVERDOSE OF HEROIN-LACED VAPE PENS

The judge threw out the confession as it related to Niall, the first child to pass, as Pilkington has said she accidentally rolled over on the baby and insisted his death was an accident, according to the Columbus Dispatch. In Niall’s death she was found guilty of involuntary manslaughter.

Pilkington’s ex- husband pleaded guilty to a misdemeanor charge of sexual imposition for having sex with his wife before they were married, when she was underage. Joseph Pilkington had a romantic relationship with Brittany Pilkington’s mother prior to their relationship, and had been living with her as a sort of stepfather for six years. In 2009 when Brittany was 17, Joseph, two decades her senior, impregnated her.

“Brittany has robbed us all of the chance to watch three beautiful boys grow up,” Grimes, Hailey’s caretaker, said. “Can you ever imagine, the last thing you saw in this world was your mother as she smothered you to death?”

One of Pilkington’s attornies Kort Gatterdam said the mother suffered lead poisoning as a child and years of physical and sexual abuse. As a result, a scan identified brain damage.

“Brittany’s brain is broken,” he said Tuesday. “And no one ever helped her.”

CLICK HERE TO GET THE FOX NEWS APP

Attorney Tina McFall read a statement on behalf of Pilkington, saying she “loves and misses all of her children and grieves for them every day.”

The Associated Press contributed to this report.