DETROIT — A federal appeals court has upheld an eight-year prison sentence for a man who attacked a Detroit prosecutor in court, saying a table counts as a “dangerous weapon.”

In 2014, Ronnie Duke injured a prosecutor by striking her head against a table during a court hearing. He argued that his sentence was improperly enhanced because a judge considered the table to be a dangerous weapon.

But in a 3-0 decision Tuesday, the appeals court says federal Judge Stephen Murphy made the right call. The court says a table can be a dangerous weapon even if it’s stationary.

Duke’s sentence for the attack was on top of a 13-year prison sentence for mortgage fraud.