A German court sentenced 94-year-old Reinhold Hanning to five years in prison for being an accessory to the murder of 170,000 people between January 1942 and June 1944, when he served as an SS guard at the Auschwitz death camp in Nazi-occupied Poland.

More than 1 million people were systematically murdered at the camp during World War II. Almost all of them were Jewish.

Hanning, who served in a unit that handled newly arrived prisoners and assisted in determining who would be enslaved and who would be sent to die, was charged in connection with the slaughter of Hungarian Jews at Auschwitz. The number of murders in which Hanning was found to be complicit, 170,000, was determined by matching Hanning's service records with transportation logs for Hungarian Jews.

Many survivors took the witness stand to testify about what they experienced at the camp. "It was just like Dante's Inferno," Leon Schwarzbaum told a packed courtroom in Detmold, Germany, according to The Guardian. His time as a prisoner at the camp overlapped with the time Hanning was a guard there.

"The older I get, the more time I have to think about what happened," Schwarzbaum said. "I am nearly 95 years old and still I often have nightmares about this."

The Guardian described the scene in the courtroom during Schwarzbaum's testimony:

"His hands trembling and his voice shaking, Schwarzbaum looked directly at Hanning and delivered an emotional plea: 'Mr Hanning, we are virtually the same age and soon we will face our final judge. I would like to ask you to tell the historical truth here, just as I am. Tell the truth about what you and your colleagues did.' "

Initially, Hanning refused to speak. But in April, as the trial entered its fourth, and final, month, Hanning broke his silence. The New York Times reports that according to German public broadcaster WDR, Hanning said he "deeply regretted" having been part of a criminal organization that murdered millions of people.

"I am ashamed that I witnessed injustice and allowed it to continue without taking any actions against it," Hanning said from his wheelchair, according to the newspaper. "I am sincerely sorry."

When she handed down the verdict, Judge Anke Grudda said, "This trial is the very least that society can do to give ... at least a semblance of justice, even 70 years after and even with a 94-year-old defendant," according to AFP. She added:

"The entire complex Auschwitz was like a factory designed to kill people at an industrial level. You [Hanning] were one of those cogs."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.