CHARLOTTESVILLE, Va. — James Fields Jr., an avowed white supremacist who rammed his car into counter-protesters of a “Unite the Right” rally in 2017, killing Heather Heyer and injuring dozens of others, was sentenced to life in prison without the possibility of release on hate crime charges Friday.

"Protection of the public requires a life sentence without release," said U.S. District Court Judge Michael Urbanski.

Before the sentencing, Fields, a 22-year-old from Maumee, Ohio, walked to a podium to address the court, speaking to the judge in an even, unemotional voice.

“I apologize for the hurt and loss I’ve caused,” he said. “Every day I think about how things could have gone differently and how I regret my actions. I’m sorry.”

Urbanski said the evidence showed that Fields' actions were premeditated and "doesn't demonstrate a crime born out of impulse, youth or mental illness." At one point, he referred to Fields as a "disturbed young man."

Fields had been brought into the courtroom handcuffed and in prison garb. He slouched in his chair, occasionally pushing glasses up the bridge of his nose. He looked up, facing victims of the attack every so often as they read statements to the judge.

As a part of a deal with federal prosecutors, the death penalty was off the table.

Fields, who had a history of pro-Nazi social media postings and who occasionally adorned text messages with photos of Adolf Hitler, appeared in U.S. District Court for the Western District of Virginia. He faced sentencing after pleading guilty in March to 29 federal hate crimes.

Thomas Cullen, U.S.attorney for the Western District of Virginia, told reporters that he believes the life sentence would send a message to other extremists who might attempt similar actions.

"The bigotry and ideology of neo-Nazis, Nazis, white supremacists, and the Ku Klux Klan are a disgrace to this country and all acts based on those who hold them should be erased from the United States," he said.

In December, Fields was convicted of murder in state court; those charges are separate from the federal charges he was being sentenced for on Friday. A sentencing hearing on the state charges is set for July 15. A jury has recommended a sentence of life, plus 419 years.

At Friday's hearing, prosecutors presented film of the Aug. 12, 2017 attack, along with samples of Fields' social media postings and recordings of phone conversations with his mother while in jail.

Prosecutors told U.S. District Judge Michael Urbanski that the avowed white supremacist was “like a kid at Disney World” during a high school trip to a German concentration camp, as a classmate told the FBI.

FBI Special Agent Wade Douthit read grand jury testimony from one of Fields' high school classmates who said he appeared happy when touring the Dachau camp and remarked, “This is where the magic happened.”

The statement provoked audible gasps from a packed courtroom crowd that included dozens of victims and Heyer's parents.

At one point, prosecutors played recordings of jailhouse phone calls between Fields and his mother in 2018, just over a year after the attack, in which he told her, "I hope I can get that insanity thing.”

In another call, Fields describes Heyer as "a communist,” according to prosecutors. "An anti-white, liberal. It’s not up for questioning. She’s the enemy.”

“Nobody is the enemy,” his mother replied.

“She is the enemy,” Fields insisted before cursing at his mother and telling her to stop questioning him.

Many in the courtroom sobbed as images of Fields' victims and their injuries were shown. Some left the courtroom.

Mark Heyer, Heather's father, spoke directly to the court and said: "I want to publicly forgive him. It is not me, it is Christ in me."

Susan Bro, Heather's mother, said in a victim statement that “I would like to see (Fields) find meds that help heal his mind.”

“I would like to see him grow from a white supremacist into someone who can help bring others away from white supremacy,” she told the court.

"I've tried to just leave him in the hands of justice," Bro told USA TODAY before the hearing. "I have been trying to move forward with making her death count for something."

Bro said she had hoped the judge would give Fields multiple life sentences. But she's been trying to focus on other projects, such as the Heather Heyer Foundation. The non-profit provides scholarships for young people interested in social change.

Fields killed Heyer, a 32-year-old paralegal and activist, and injured dozens of others by plowing his car into the crowd of peaceful counter-protesters in 2017.

Hundreds of counterprotesters had turned out to face an assortment of alt-right and far-right protesters, who had descended upon the Virginia college town to rally against the removal of a statue of Confederate Gen. Robert E. Lee.

What is the alt-right?:How is the alt-right using social media to spread its message?

Fields was among them.

During Fields’ state trial, a psychologist testified for the defense that Fields had inexplicable volatile outbursts as a young child, was diagnosed with bipolar disorder at age 6 and was later diagnosed with schizoid personality disorder.

In a sentencing memo, defense attorneys said Fields was raised by a paraplegic single mother and suffered “trauma” knowing that his Jewish grandfather had slain his grandmother before taking his own life.

At the time of the attack, President Donald Trump blamed the violence at the rally on "both sides," sparking further controversy and stirring racial tensions.

Urbanski reminded Fields that he waived his right to appeal and if he decided to do so, any benefits from his plea deal would be lost.

Follow Morgan Hines on Twitter: @MorganEmHines