Updated

A Mississippi man charged with using an ax and a rifle to kill five people in rural Alabama has pleaded guilty to capital murder, court records show.

A judge accepted the pleas Derrick Dearman made after the Lucedale, Mississippi, man signed a document last week saying he wanted to admit his guilt in killings that occurred two years ago near Citronelle.

The town is located in southwest Alabama about 35 miles (56 kilometers) from Mobile.

A trial still must be held under state law since the 29-year-old man pleaded guilty to capital charges, which carry a potential death penalty or life without parole.

Dearman was accused of killing the five people at a home where his estranged girlfriend was staying. Dearman has told reporters he was high on methamphetamine at the time.

"Drugs (were) making me think things that's not really there," Dearman told news outlets after his arrest.

Records show Dearman, acting as his own lawyer, said he wanted to plead guilty in the slayings of Robert Lee Brown, 26; Chelsea Marie Reed, 22; Justin Kaleb Reed, 23; Joseph Adam Turner, 26; and Shannon Melissa Randall, 35.

Chelsea Reed was about five months pregnant when she was killed; Justin Reed was her husband. Turner and Randall were also married.

Turner was the brother of Dearman's estranged girlfriend Laneta Lester, who authorities said had sought refuge from an abusive Dearman at the isolated home where the five were killed.

Dearman was originally charged with abducting Lester and child from the home following the killings, but records show prosecutors dismissed those charges as he agreed to plead guilty to the more serious charges.

A motion filed by Dearman's former attorney shows that a mental examination found Dearman competent to plead guilty but incompetent to stand trial or make decisions about the possible death penalty since he was suicidal and had mental problems.