A 94-year-old former Auschwitz guard was found guilty Friday of being an accessory to the murder of more than 170,000 people for his role in helping kill 1.1 million at the Nazi death camp during World War II, the Associated Press reported. Reinhold Hanning was sentenced to five years in prison. He had faced a maximum of 15 years.

Over the course of his trial, which started in February, Hanning admitted to serving as a guard at Auschwitz and said he was embarrassed that he knew Nazis were killing Jews but did not try to stop the atrocities.

Hanning was an SS sergeant during his service for the Nazis — not a high-ranking official — and his lawyer used this to argue he should be acquitted because there was “no proof” Hanning was involved in any killings or torture, the Guardian reported. However, prosecutors asked for a six-year sentence and based their case on the idea that Hanning was involved in the Nazi operation and made their killings possible, so he should be punished regardless of his rank.

The 94-year-old initially refused to speak at his trial, which angered survivors of the death camp who had flown to Germany to testify. Despite his age, Hanning seemed very aware of the trial, the AP reported. He usually used a wheelchair but sometimes walked into the courtroom on his own.

After the trial was underway, Hanning made a surprise statement in April to “apologize wholeheartedly” for his role in the Holocaust, the Guardian reported at the time.

“It disturbs me deeply that I was part of such a criminal organization,” he told the court in April. “I am ashamed that I saw injustice and never did anything about it, and I apologize for my actions.”

Hanning’s case is similar to other trials of former Nazis that prosecutors in Germany have pursued more aggressively in recent years. Last year, SS Sgt. Oskar Groening was convicted of 300,000 counts of accessory to murder for his time at Auschwitz. Groening, who is 95, was given four years in prison but remains free until his case goes through a long appeals process. Similarly, Hanning will remain free for any appeals.

As those involved in Nazi operations age and move toward death, special prosecutor Jens Rommel and his office have been trying to get in a final wave of investigations before the generation is gone. The Hanning case has widely been considered one of Germany’s last Nazi trials, but Rommel told the AP his office will continue to give cases to prosecutors and pledged to keep his office open until 2025.

“If the cases will make it to trial, that's hard to say. You can't really look into the future — but we have the mandate to keep investigating as long as there's still the possibility of finding someone,” he said.