It was a scorching Mississippi day when, former police officer Cassie Barker said, she strapped her daughter Cheyenne into a car seat, cranked the vehicle’s nonfunctioning A/C and slipped into her supervisor’s home to have sex.

Barker was inside for four hours on Sept. 30, 2016, while her 3-year-old daughter was restrained inside a police patrol car; the child’s body temperature climbed unbearably high.

The two Long Beach officers eventually fell asleep. Cheyenne was unresponsive when Barker finally returned. Authorities said her body temperature reached 107 degrees before she died.

It is not clear whether Barker intentionally left her child in the car.

Barker, 29, pleaded guilty to a reduced charge of manslaughter in a plea deal Monday.

“I don’t know what I could ever do to you that could be worse than what you’ve already experienced,” Harrison County Circuit Judge Larry Bourgeois told her. “You will forever be entombed in a prison of your own mind.”

Barker avoided a second-degree murder conviction after she admitted in court that a chain of events beginning with a sexual encounter led to her daughter’s death, the Biloxi Sun Herald reported.

Prosecutors recommended a 20-year sentence. Bourgeois said he would consider the punishment before an April 1 sentencing.

Barker and Clark Ladner, her supervisor, were fired within days of the incident, the Associated Press reported. He avoided charges after he told authorities that he did not know Barker’s child was in the car.

Cheyenne’s father, Ryan Hyer, said Monday that his daughter’s death has haunted him in the years since.

“Every time I close my eyes, I picture her suffering, and then I picture her laying in this coffin,” Hyer said Monday, the AP reported. “I still see her smiling and laughing in my head, and I would assume that smile and laughter turned to pain and suffering in that instance.”

Hyer later learned that Barker had left their daughter in a car during a separate incident the year before.

Barker went into a store in nearby Gulfport, and a concerned passerby called police. Child protective services took temporary custody of her, and Baker was suspended for a week without pay over the incident, the AP reported.

But Hyer was never notified, he said. He is suing the Long Beach Police Department and the Mississippi Department of Child Protection Services in a wrongful-death suit, the AP reported.

Read more: