CHARLESTON, S.C. (AP) — A South Carolina man who robbed and killed a 70-year-old woman and a 77-year-old woman in separates burglaries three years ago will spend the rest of his life in prison.

Jerry Manigault pleaded guilty Tuesday to six charges in Beaufort and Charleston counties, a week before his second trial in one of the deaths, prosecutors said. The first case ended in a mistrial.

Manigault, 57, is a registered sex offender and was sentenced to four separate life sentences without parole, prosecutors said.

"The defendant preyed on the most vulnerable — elderly women who were home alone," prosecutor Jennifer Kneece Shealy said in a statement.

Manigault first forced his way into 77-year-old Julia Mudgett's Hollywood home in May 2014, beating her so badly that nine skull fractures were found at her autopsy, authorities said.

Manigault dumped Mudgett's body in the woods, where it was found almost two weeks later. He also took her car, which investigators said he tried to sell.

Manigault pleaded guilty to murder, burglary and strong-armed robbery in Mudgett's death.

About a week later, a relative found 70-year-old Polly Mitchell dead after checking on her because her porch light at her Bluffton home was still on at 2:30 p.m.

Prosecutors said Manigault raped Mitchell and strangled her with a television cord, but she didn't die without a fight. His skin was found under her fingernails and he had a number of scratches behind his ear.

Authorities were already looking for Manigault in Bluffton in connection with Mudgett's disappearance. He was arrested a few hours later, and officers found Mitchell's jewelry in his backpack and money stained with Mitchell's blood in his pocket, prosecutors said.

Manigault pleaded guilty to murder, burglary and criminal-sexual conduct in Mitchell's death.

Assuring Manigault dies in prison is good not just for the family of the victims, but for the safety of everyone in Beaufort and Charleston counties, said Solicitor Duffie Stone, who helped prosecute the case.