HAMBURG — A 93-year-old former SS guard was convicted Thursday of being an accessory to murder at the Stutthof concentration camp in what could be one of Germany's last Nazi trials amid a recent surge in investigations and charges.

The Hamburg State Court convicted Bruno Dey of 5,232 counts of accessory to murder and one charge of accessory to attempted murder, the court press office announced Thursday.

“How could you get used to the horror?” presiding Judge Anne Meier-Goering asked rhetorically in sentencing the defendant, the German news agency DPA reported.

Dey, now a pensioner in a wheelchair, was sentenced to two years of suspended probation.

The 5,232 counts represented the number of people who investigators say were murdered at ­Stutthof, near the Polish city of Gdansk, when Dey served there as a Nazi guard between August 1944 and April 1945. Dey was sentenced according to juvenile criminal law because he was 17 and 18 at the time of his crimes, which occurred during the final years of World War II.

Overall, an estimated 65,000 Jews and political enemies were murdered and subject to “systematic killing” in Stutthof, according to the court statement. Victims were often shot, gassed or deliberately starved to death. The Nazis called Stutthof a “work education camp.”

Forty co-plaintiffs were part of the trial, with 35 survivors of ­Stutthof among them. Four of the former prisoners appeared at the Hamburg court to recount daily abuses, hunger and executions in that camp, according to the German public broadcaster Tagesschau.

At the start of the trial in October, Dey claimed he did not understand why he was being charged this late in his life, according to news magazine Der Spiegel. His wife, daughters and grandchildren accompanied him to all 45 days of court proceedings, which were limited to two-hour sessions twice a week because of his age.

In his closing statement this week, Dey apologized to the victims and their relatives. He claimed that the personal accounts of survivors and experts during the trial made him aware of the extent of the atrocities committed in the camp, Der Spiegel reported.

In the lead-up to the trial, however, investigators said Dey had described horrific scenes of violence and suffering at the camp. In a court statement, prosecutors accused him of being “aware of all circumstances” of a “murderous apparatus.” It also alleged that he “contributed to the execution of the kill order.”

Dey’s defense had sought an acquittal, citing his age and the juvenile court setting. The defense also tried to cast doubt on the trial’s legitimacy, as it took place decades after authorities first became aware of Dey’s past.

Authorities attributed the timing to changes in recent years in the legal basis of what counts as sufficient evidence for charges of murder and abetting murder in German courts, which have made it easier to prosecute former Nazi criminals.

Before 2011, German courts had to present specific evidence connecting a former Nazi officer or guard with the death of one or more individuals. The 2011 conviction of John Demjanjuk, a former guard at the Sobibor death camp in Nazi-occupied Poland, set a different legal precedent. The court convicted Demjanjuk on the basis of the broader evidence that he worked at a Nazi death camp. (Demjanjuk, an American citizen, died before his appeal could be heard.)

Another case, in 2016, confirmed this legal framework, after a German court found former Auschwitz guard Oskar Gröning guilty of being an accomplice in the murder of about 300,000 Hungarian Jews. Gröning’s appeal was rejected.

Since then, there has been a surge in investigations and charges against former Nazi guards and officers. According to a special office investigating Nazi crimes, there are 14 ongoing investigations into crimes committed in concentration camps. The rush by authorities to reexamine old files comes amid rising concern over anti-Semitism in Europe and as the last of the World War II generation passes away.

Dey’s was probably one of the last Nazi trials that German courts will hear through to its completion.

The vast majority of Nazi guards and officers never stood trial. In the German city of Wuppertal, one 95-year-old former guard from Stutthof could be among those next to be charged if a court rules that he is fit for trial, according to Tagesschau.