BERLIN — The sole surviving member of one of Germany’s deadliest neo-Nazi terrorist groups was sentenced to life imprisonment on Wednesday, in the culmination of a saga that has shamed the country’s security services, strained its relationship with Turkey and fueled accusations of institutional racism.

After a trial in Munich that lasted more than five years, the group member, Beate Zschäpe, was convicted of 10 counts of murder, with additional counts of attempted murder, robbery, arson and belonging to a terrorist organization.

But her conviction and sentencing, almost 18 years after the group’s first victim was killed, seems unlikely to bring closure at a time when German politics have become more fractured and the national discourse more anti-immigrant.

The trial started before Germany accepted more than a million refugees and before a far-right party had won any seats in Parliament, let alone become the country’s main opposition.