AIKEN, S.C. -- A man was sentenced to life in prison without parole on Monday after pleading guilty but mentally ill in the shooting death of an Aiken law officer.

Joshua Tremaine Jones, 28, entered the plea after a hearing in the death of Master Cpl. Sandy Rogers, who was shot to death in January 2012 while responding to a suspicious vehicle call.

During the hearing, a psychiatrist testified that, after a March 2011 mugging and beating, Jones tried to commit suicide by shooting himself in the head, causing damage in the areas of the brain controlling emotions, impulse control and judgment in stressful situations.

After his arrest, Jones' would bite his wrists until they bled and reported hearing voices, Dr. Donna Schwartz-Watts testified, saying that he is schizophrenic.

"He told me he hears three voices; they all talk at once and say very horrific things to him," she said, according to the Aiken Standard. "Sometimes he responds to them and sometimes he tries to ignore them. He noticed that when he ignores them, they say worse things."

Jones will be incarcerated in a maximum-security prison with a mental health facility, according to prosecutor Strom Thurmond Jr.

Hours before shooting Rogers, police say that Jones gunned down his pregnant girlfriend in her Augusta, Ga., apartment. Charges are still pending in that case.

Rogers was the first female South Carolina officer killed in the line of duty and the second Aiken officer slain in as many months. Stephon Carter is slated to go on trial later this year in the death of Officer Scotty Richardson.