Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LUENEBURG, Germany — The 94-year-old former guard known as the "accountant of Auschwitz" was convicted Wednesday on 300,000 counts of accessory to murder.

Oskar Groening was sentenced to 4 years in jail by the state court in the northern German city of Lueneburg, where a small group of protesters stood outside carrying a white "Don't forget Auschwitz" banner.

Presiding judge Franz Kompisch noted the importance of such prosecutions even after decades had passed.

"Even after 70 years, one can create justice, and one can find a verdict," he told the court. "There is a hope that the victims could find some peace and some reconciliation," he said.

"Auschwitz was a machine for murder and finally the German justice system is stating this clearly"

Prosecutors had asked for a 3½-year sentence. It was not immediately clear when and how Groening would serve his time — both sides have a week to appeal the verdict and Groening will remain free in the meantime.

Groening — who entered the courtroom with the help of a walker — sat quietly during the reading of the verdict and did not make any comments as he left.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

His lawyer Hans Haltermann told NBC News that he would be consulting with Groening and decide soon whether to file an appeal.

Cornelius Nestler, a lawyer for co-plaintiffs, said that the length of the prison sentence was not important but rather that the court had made an overdue statement.

"The central point the court made is that Auschwitz was a machine for murder and finally the German justice system is stating this clearly," he said.

The charges against Groening relate to the period between May and June 1944 — when some 425,000 Hungarian Jews were brought to Auschwitz. At least 300,000 were immediately sent to the gas chambers.

While Groening had spoken openly in interviews about his time as an SS guard at Hitler's infamous death camp in occupied Poland, he insisted he only witnessed atrocities and did not commit any crimes.

On his first day in court in April, Groening said he felt morally guilty for his work at Auschwitz but that it was up to the court to determine if he was legally guilty.

His lawyer later said Groening felt he could "only ask" God for forgiveness because the crimes committed at Auschwitz were "on such a scale that he can't expect either the victims or their relatives to even think about the question of forgiveness."

Groening's trial — 70 years after the liberation of Adolf Hitler's concentration camps — was likely to be one of Germany's last Nazi prosecutions.

Germany has mounted a last push to bring Nazi criminals to justice, but the suspects and fugitives are aging and many have died.

The World Jewish Congress welcomed the Groening verdict, saying that "albeit belatedly, justice has been done."

"It was the right decision to put him on trial despite his old age, and it was right that he was handed a jail sentence," the group's president Ronald Lauder said in a statement. "He may have to spend the final years in confinement, but that is a small punishment for the unspeakable crimes he abetted."

Auschwitz survivor Leon Schwarzbaum attended the reading of the verdict.

"It's a matter of justice, of course," he told NBC News. "I can't say that I'm happy. My life has been destroyed, completely destroyed."