In August 2013, the 25-year-old homeless man entered city hall armed with a knife and a fake gun. Four people were taken hostage, among them was deputy mayor Sepp Mißbleck.
Mißbleck was among those first released.
Police were called to the building at 9.00am that day and at 5.50pm, stormed the building with a commando unit, finally arresting the man after shooting him in the shoulder and hand. None of the victims were physically harmed.
The assailant was already known to police. He had stalked one of the hostages, Mißbleck's assistant, for years prior, verbally and physically assaulting her in the process.
As a result, the man was banned from city hall after the assistant took out a restraining order against him.
He testified in court that he had intended to get an apology from officials for the ban.
During sentencing, the prosecutor demanded 10.5 years prison, while the defence argued for 6.5. The defendant himself asked for a seven year sentence, the Bayerischer Rundfunk reported.
The judge decided for a lesser sentence due to the perpetrator's diminished responsibility. Court-ordered psychiatric evaluations found that the man had a personality disorder. He had already been in the care of a psychologist at the time of the crime.
Angela Merkel also cancelled a campaign rally planned for Ingolstadt on the same day, though police said there had been no connection between the Chancellor's plans and the incident.