TORONTO - Prosecutors are seeking a new trial for a man who attacked uniformed personnel at a Toronto military centre three years ago, arguing he should be considered a terrorist even though he acted alone and mental illness rendered him not criminally responsible for his actions.

Ayanle Hassan Ali was charged with attempted murder, assault causing bodily harm and assault with a weapon, as well as carrying a weapon, all for the benefit of a terrorist group in connection with the March 2016 knife attack.

Last year, an Ontario judge found that while Ali was motivated by his extremist beliefs, the emergence of those beliefs was linked to his mental illness. The judge also found Ali was acting alone and thus not for the benefit of a terrorist group.

Ali was therefore cleared on the terror element of the charges and found not criminally responsible on lesser included offences.

Crown attorneys argue in appeal documents that the trial judge misinterpreted the law in a way that would make it harder to stop and prosecute so-called lone wolf terrorists.

They say Ali should still be considered not criminally responsible, but on the terror charges rather than the lesser ones -- and since the court cannot simply make that change, a new trial is warranted on that issue.