BERLIN (AP) — A German court has ended the trial of former SS medic who served at the Auschwitz death camp after experts determined the 96-year-old is unfit for trial.

Prosecutors said last month they were seeking to end the prosecution of Hubert Zafke following two recent examinations by experts. News agency dpa reported that Neubrandenburg state court spokesman Carl Christian Deutsch said Tuesday the defendant is no longer fit for trial because of his dementia.

Zafke was charged with 3,681 counts of accessory to murder in 2015 for allegedly helping the Auschwitz camp function. His attorney says he did nothing criminal.

Zafke’s trial was marked by lengthy delays over questions of his health. In June, three judges were removed after prosecutors and attorneys representing Auschwitz victims and their families complained of bias.