A South Carolina man who pleaded guilty to killing three of his girlfriend's relatives due to a custody fight involving their 4-month-old son accepted a plea deal Thursday that will send him to prison for the rest of his life.

Prosecutors wanted to seek the death penalty for Kenneth Ancrum. But the families of the victims asked not to be dragged through decades of court hearings and appeals. Their only stipulation was that officials assure them he would never leave prison, news outlets reported.

Kenneth Ancrum pleaded guilty in Charleston County to five counts of murder on Thursday in the slayings of 55-year-old Betty Mungin, 8-year-old Armani Mungin, and Armani's mother, 29-year-old Alexis Mungin, who was pregnant with twins who prosecutors said were old enough to survive outside the womb, but could not be saved.

Authorities say the three victims were related to Ancrum's girlfriend, but the exact nature of the relationship wasn't clear.

Ancrum had no criminal convictions before he went over to the mobile home next door in Ravenel and started firing on May 17, 2016, The Post and Courier of Charleston reported.

But he was becoming angry due to post-traumatic stress disorder from his time in the Army as a combat soldier in Afghanistan, defense lawyer Ashley Pennington said.

Ancrum apologized for his actions and said his PTSD was no excuse.

"I really from the bottom of my heart apologize to the family," Ancrum said. "I wish this never happened."

Ancrum also shot his girlfriend, Quiwanna Mungin, in the leg and forced her into a car. They were driving off when a deputy pulled them over, likely saving the woman's life, solicitor Scarlett Wilson said.

Quiwanna Mungin said her former boyfriend should never be let out of prison.

"When (our son) gets old enough, I will tell him the truth," she said. "His dad is a monster."