CENTENNIAL — When the courtroom door closed for a final time behind the perpetrator of one of the most heinous crimes in Colorado history, the last sound he heard was cheering — not for him, but for his ruin.

Judge Carlos Samour Jr. on Wednesday sentenced James Holmes to the maximum time in prison possible for committing the Aurora movie theater shooting. Holmes was ordered to serve 12 consecutive life sentences in prison — one for every person he killed on July 20, 2012 — followed by another 3,318 years for trying to kill 70 other people and plotting to blow up his apartment. There is no chance for parole.

The millennia-spanning sentence is one of the longest ever handed down in America, and Samour delivered it without once saying Holmes’ name or even speaking directly to him. When he was finished, shortly before noon on the 175th day that Holmes spent in court, Samour looked toward the killer with a scowl uncharacteristic of the normally even-tempered judge.

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

And as a sheriff’s deputy pulled Holmes toward the exit, the lingering sound of the Aurora theater shooting trial was not the sound of gunshots that percussed the courtroom in 911 calls played during the trial or the sound of weeping that so often filled the empty spaces when there was nothing more to say. It was the sound of jubilant, exultant voices from those the shooting hurt most.

A courtroom audience filled with them burst into applause when Samour delivered his final rebuke. There were whoops and cheers that only grew louder when the crowd realized Samour would do nothing to stop them. One woman shouted, “Loser! Loser! Loser!”

And then the door closed, and Samour stepped down. A journey to justice 1,132 days in the making had ended.

For the first time in more than three years, the people hurt by the shooting and the person who hurt them will now walk divergent paths.

Holmes will be handed over to the Colorado Department of Corrections, which will probably first assess him at a facility in Denver before assigning him to a prison. It is entirely up to corrections officials whether Holmes is placed in solitary confinement or the general prison population. He could be sent to a prison out of state, although prosecutor Rich Orman said Wednesday, “I think most places would be extremely reluctant and would need a lot of persuading before they would agree to take him.”

Survivors of the shooting, their friends and family, and loved ones of those slain will now return to lives irrevocably altered by the attack on the Century Aurora 16 theater and try to move forward. Prosecutors have requested that Holmes pay restitution of more than $700,000, an amount that could rise in the coming days as more expenses are added up.

Before Samour imposed his sentence, he directed most of his hour-long comments toward the survivors and victims’ families. He defended the justice system in the face of criticism about the outcome — in which jurors convicted Holmes of every count he faced but split over whether he should be executed, the harshest punishment allowed by state law. Samour pushed back against the suggestion that the case should have been settled by a plea bargain rather than going to trial.

Look at the outcome another way, he urged. Look at the information learned about the crime that would have remained hidden without a trial. See the opportunities that parents had to tell the jurors about their slain children.

People in the courtroom audience stared back stone-faced. But as Samour ticked through some of those details for each of the slain victims — Jonathan Blunk’s strength, Jesse Childress’ sense of adventure, Matthew McQuinn’s charm — the faces in the courtroom softened. Some began to cry.

“We are different from the criminal who is on trial,” he said.

That criminal quit on life, Samour said. He suffered some setbacks — a failure at school, a broken relationship — and he just gave up, deciding instead to commit “horrific, senseless, heinous, cowardly, shocking acts.”

It was a credit to the justice system that a jury of strangers — a literal representation of the community that Holmes struck at — could hold him accountable for his crimes, Samour said. And it was a poignant footnote that at least one juror showed the killer the mercy that he showed none of his victims.

“Your healing is not tied to the defendant’s fate,” Samour said to the audience. “And you’ve shown that.

“You’re not quitting.”

When the hearing was over, a burst of pressure left the courtroom. Victims hugged prosecutors, police officers, sheriff’s deputies, one another and several of the case’s jurors, who watched the final sentencing from the back of the room. The crowd spilled out of the room together in joyful embrace.

In the hallway, they shared jokes and smiles. They made plans to meet up for a final goodbye. The father of one slain victim carried around a pointer stick that prosecutors had used during the trial and asked people to sign it.

“We’re so happy he got the maximum of everything,” Rena Medek, the mother of slain victim Micayla Medek, said later.

Gradually, the hallway cleared, and the crowd made its way outside.

A victims advocate carried a carton piled high with Kleenex boxes away from the courtroom.

A trio of therapy dogs and handlers took the elevator down.

The sheriff’s deputies on guard left their posts.

The courthouse stilled for the first time in months, and only one person was left behind, no longer allowed to walk out into the free sunshine.

John Ingold: 303-954-1068, jingold@denverpost.com or twitter.com/johningold