LAS VEGAS (KLAS) — A Clark County judge sentenced a man convicted of the murders of his young nephew and, a few months later, his cellmate, in court Thursday.

Judge Tierra Jones ordered 29-year-old Carl Marcus Guilford to serve 20 years-to-life for the 2011 killing of Guilford’s nephew, Christopher Montgomery, who was 6 years old. The court considered the offense first-degree murder because of the age of the victim.

Guilford pleaded guilty to smothering the six-year-old boy with a blanket, having told police that he was hearing voices and had been complimented afterward by the devil, according to court documents.

Jones then sentenced Guilford to two-to-five additional years for the voluntary manslaughter of his cellmate, Francesco Sanfilippo, a sex offender who was bunking with Guilford at Clark County Detention Center.

Guards found Guilford drawing on the body of Sanfilippo, who had been “beaten to death, stabbed with a pencil and had his head slammed into the ground,” documents said.

Guilford initially said Sanfilippo attempted to “touch his butt,” according to court records, but in a subsequent interview, told homicide detectives, “the devil told him to kill his roommate. If he did not do so, the devil would make Guilford kill himself,” documents said.

Guilford addressed the court Thursday, apologizing to his family. He said he did not mean to kill his nephew. He took Alford pleas in both cases, meaning he did not admit guilt but acknowledged prosecutors had enough evidence to sway a jury to convict him.

In the nearly 12 years since Guilford’s initial arrest, the court held many hearings on his competency and his mental capacity to stand trial. Court records show 14 different prosecutors made appearances in Guilford’s proceedings, and for his part, Guilford had six attorneys defending him at different stages of the litigation. He also represented himself at least once, having filed handwritten motions while incarcerated.

Jones credited Guilford with the time he spent in jail awaiting trial – some 4,258 days, or 11-plus years, she said during the hearing. Guilford’s attorney said in court that his client has essentially spent the entire time since the second murder in solitary confinement.