Barrier tape hangs in front of the local district court in Dachau, after a man shot and killed a prosecutor on January 11, 2012.

Story highlights

The man opens fire and shoots a prosecutor, police say

He was being sentenced for misappropriation of payroll funds

CNN  — 

A man accused of killing the prosecutor in a Dachau courtroom during his sentencing will face a murder charge Thursday, German police said.

The 54-year-old was being sentenced Wednesday for “withholding and misappropriation of payroll monies” when he pulled out a pistol and opened fire, police statement.

The 31-year-old prosecuting attorney was struck several times and later died at a local hospital.

Two witnesses in the courtroom overpowered the shooter.

Dachau is located about 16 kilometers (10 miles) north of Munich in the southern state of Bavaria

CNN’s Ben Brumfield contributed to the story.