A Colorado judge formally sentenced James Eagan Holmes to multiple life terms without parole plus thousands of years in prison for the Aurora movie theatre massacre that killed 12 and wounded 70.

Holmes, a 27-year-old former grad student, received one life term for each person he killed, plus 3,318 years for the attempted murders of those he wounded and for rigging his apartment with explosives.

“It is the court’s intention that the defendant never set foot in free society again,” Judge Carlos A. Samour Jr. said after imposing the sentence Wednesday. “If there was ever a case that warranted a maximum sentence, this is the case. The defendant does not deserve any sympathy.

“Sheriff, get the defendant out of my courtroom please.”

There was a smattering of applause as Holmes, shackled at the waist and wearing red prison garb, was led away from the courtroom where he has spent most of his days since jury selection began in January.

James Holmes appears in court for the sentencing phase in his trial.

The sentencing brought to an end a long, emotionally draining trial that featured graphic descriptions of the gruesome crime scene and heart-breaking stories of the lives taken and shattered by Holmes’ bullets in July 2012.

The trial also focused on Holmes’ mental illness. A notebook containing his rambling thoughts and detailed plans for the massacre, as well as hours of videotaped interviews with a court-appointed psychiatrist, dominated that part of the testimony.

Holmes revealed that he had been obsessed with killing people since his early teens. He said he studied neuroscience in part to fix his own “broken brain.” He also said he contemplated suicide before devising a “life capital” plan that awarded him points for each life he took.

The defense portrayed Holmes as a victim of mental illness and brought forward a parade of witnesses who knew him as a sweet, academically gifted child. But prosecutors disdainfully portrayed him as a self-absorbed loser who lashed out violently after setbacks in his love life and his studies.

A jury rejected Holmes’ insanity defense and convicted him of 24 counts of murder, 140 counts of attempted murder and a single explosives charge. But the jury could not agree on the death penalty; there was a lone holdout.

He received the only alternative on the 24 murder counts — life sentences without parole, to be served consecutively. The additional years, which cover the attempted murder and explosives convictions, will be served consecutively to the murder sentences. The judge merged the two convictions for each victim into a single count.

More than 100 shooting survivors and friends and relatives of the people he killed offered heartbreaking testimony about their loss at the formal sentencing hearing, which began on Monday. Some called Holmes a monster and said he had cheated the executioner.

They spoke of holidays, weddings and graduations that won’t be celebrated, and about depression, night terrors and survivor’s guilt. Some have yet to set foot in a movie theater.

His defense attorneys have said they will not appeal Holmes’ convictions or the sentence, noting that Holmes offered early on to plead guilty if prosecutors took the death penalty off the table.

Before issuing the formal sentence, Samour defended the criminal justice system, saying it worked even if some people were not happy that Holmes didn’t receive the death penalty.

He said he understands why some survivors are disappointed and noted that the lone holdout juror showed more compassion toward Holmes than the defendant ever showed his victims.

“The jury was not able to return the sentencing verdicts you were hoping for,” Samour said. “It feels like rejection. It feels like you were asking for something and were rejected. It feels like defeat.”

He assured them it was not. He pointed out that the mandatory life sentences, and the decision not to appeal, means the case ends now and the victims can finally move on with their lives. Had Holmes gotten a death sentence, the case would have dragged on, possibly for decades.

“Either way you look at it, the defendant is going to die in the custody of a department of corrections,” Samour said. “Death is certain, the only question is when.”