Brittany Renee Pilkington (seen in 2015) pleaded guilty on Tuesday

An Ohio woman accused of suffocating her three sons has pleaded guilty in the boys' deaths and was sentenced to 37 years in prison.

Brittany Renee Pilkington, 27, had been scheduled for trial early next year. The guilty pleas on Tuesday to involuntary manslaughter and murder took the death penalty off the table.

Pilkington's three-month-old son, Noah, was found dead in August 2015 in her and her husband's apartment in Bellefontaine, in western Ohio. A four-year-old son, Gavin, had died in April 2015, and another infant, Niall, had died in July 2014.

The mother confessed to killing the boys the day Noah was found, telling police in a taped confession that she was depressed and worried her sons would eventually become abusive toward women.

Pilkington´s husband, 47-year-old Joseph Pilkington, pleaded guilty to a misdemeanor charge of sexual imposition for having sex with her before they were married, when she was underage.

Pilkington's three-month-old son, Noah, (left) was found dead in August 2015. A four-year-old son, Gavin, (center) had died in April 2015, and another infant, Niall, (right) died in July 2014

Brittany Pilkingtonis seen at a January hearing. Pilkington pleaded guilty in the boys' deaths on Tuesday and has been sentenced to 37 years in prison

He originally was charged with sexual battery for beginning a sexual relationship with Pilkington, who was two decades younger, and impregnating her in 2009, when she was 17.

Joseph Pilkington impregnated Brittany while living with her as a sort of stepfather

He'd had a romantic relationship with Pilkington's mother prior to that, and his indictment indicated he had been living with Pilkington as a sort of stepfather for years. He wasn't a suspect in the boys' deaths.

Logan County prosecutors claimed that Pilkington killed her sons because she was jealous of the attention her husband paid to their sons but not to her and their daughter.

Pilkington suffered lead poisoning as a child followed by years of physical and sexual abuse with no intervention by authorities, said Kort Gatterdam, one of her attorneys.

Her parents, social service agencies and schools all failed to protect her, he said. A scan identified brain damage.

'Sadly, she´s safer living a better life in jail than on the outside,' Gatterdam said, calling his client 'irreparably damaged.'

Attorney Tina McFall, reading a statement on behalf of Pilkington, said she 'loves and misses all of her children and grieves for them every day.'

Brittany Pilkington is seen at her August 2015 arraignment. Her attorneys say that she is brain damaged from childhood lead exposure

Joseph Pilkington remains registered as a Tier 1 Sex Offender in Ohio. He was living with Brittany Pilkington as a sort of stepfather when he impregnated her when she was 17

Pilkington initially pleaded not guilty to aggravated murder charges. Prosecutors had sought genetic testing for Pilkington to rule out genetic disorders as a cause of death for the three boys.

Judge Mark Connor ordered that Pilkington´s sentences run back to back because of the seriousness of the crimes, a move advocated by prosecutors.

Logan County Prosecutor Eric Stewart said the sentence would bring 'justice and closure to this tragic case and protect the community from the defendant.'

He noted that one of the state´s own experts said the death penalty wasn´t appropriate due to Pilkington´s 'mental defects.'

Noah died less than a week after he was returned from protective custody on a judge's order.

A prosecutor said authorities didn't have any evidence of a crime in the earlier deaths, and no one could have predicted the remaining son would die.