(CNN) A bank robber who used his legal right to a "last word" to speak for five days in court has been sentenced to 12-and-a-half years in jail.

A district court in Hamburg, Germany sentenced Michael Jauernik, 71, to more than 12 years in jail for 3 bank robberies, attempted murder and violation of weapons law.

Under German law, a defendant is given the opportunity to have a "last word" after a verdict is given. Defendants generally use the time to show remorse, or say nothing.

Jauernik, who attended court in sunglasses, ranted about allegedly incompetent investigators and claimed he had more legal knowledge than his lawyers, CNN affiliate RTL reported . Jauernik's speech spanned five days, a source in the court press office confirmed.

As the verdict was delivered, the 71-year-old continually interrupted the judge, RTL said.

Read More