A judge in Michigan tore into a single mother who left her 6-month-old son in a sweltering attic — where he died while she partied with friends — during a sentencing hearing on Thursday, calling the circumstances of the case “extremely disturbing.”

Kent County Circuit Court Judge Mark Trusock excoriated Lovily Johnson, 23, while sentencing her to 20 to 80 years in prison for the death of Noah Johnson, who had been abandoned in a car seat and placed in an attic where temperatures reached 90 degrees. The infant also had no food or water and his diaper had not been changed, WOOD-TV reports.

“And what did you choose to do?” Trusock asked Johnson. “You went out with your friends, you partied, you sought out a place that had air conditioning and you used drugs.”

Trusock also told Johnson — who has a 4-year-old daughter now in foster care — that he hopes she never regains an opportunity to care for any child.

“I hope you think every day of how you killed your own child, ma’am,” Trusock continued.

Johnson’s son was already dead and still in the same car seat where she left him days earlier when the infant was taken to a hospital on July 21, 2017, MLive.com reported.

An autopsy found that the boy, who had severe diaper rash, weighed just 12 pounds and was dehydrated and malnourished after being left alone for portions of three days in an attic bedroom apartment in Wyoming.

“This was an outrageously disturbing set of facts,” Trusock told Johnson. “This was your own child, who was 6 months old, and you killed him.”

Johnson’s attorney, Jonathan Schildgren, said the single mother suffered from a dysfunctional childhood and was overwhelmed with taking care of her younger sister and 2-year-old daughter in addition to her infant son.

“She’s a young kid who probably had her heart broken when she was born,” Schildgren said. “So do I think she has the heart and soul of someone who wanted to torture and sadistically murder her baby? No, she doesn’t.”

Instead, Schildgren said, Johnson’s troubled childhood continued into her adult life, characterizing it as a “generational curse,” WZZM reports.

Johnson, who pleaded guilty to second-degree murder in November after a trial in September ended in a hung jury, asked Trusock for leniency prior to her sentencing, according to WOOD-TV.

“I understand justice has to be served for him today but I also plead for your mercy,” she told the judge. “If I could give my life for his, I would have done that.”

A man who identified himself as a father figure to Johnson told the station he was glad justice was finally served for Noah Johnson.

“I’m hurt that she did what she did,” Harry Woods told WOOD-TV. “She should have went to jail if she wasn’t taking care of her son.”