A 31-year-old Muslim man who attempted to assassinate two Canadian soldiers in Toronto in 2016 has been deemed by a Canadian court to not be a terrorist and not liable for his actions due to mental health issues.

Ayanle Hassan Ali attempted his attack on Canadian soldiers in March of 2016 when he broke into the Canadian Armed Forces Recruiting Center in northern Toronto, producing a knife which he attempted to use on a soldier sitting behind a counter before other armed forces personnel were able to subdue him, the Toronto Sun reports.

While he was initially charged with one count of terrorism, three counts of attempted murder, three counts of armed assault, one count of possession of a weapon for a dangerous purpose, and two counts of assault causing bodily harm, a Canadian court found Ali not criminally responsible due to his mental state as he suffers from schizophrenia.

Canadian Federal Prosecutors attempted to have Ali retried on terrorism charges but a court of appeal ruled that a prior judgement which deemed him a lone wolf, rather than a terrorist acting on behalf of a terror group, would stand and no new trial would take place.

BMJ: Labelling Terrorists as ‘Mentally Ill’ Stigmatises Legitimate Patients https://t.co/u7bxDrdrxC pic.twitter.com/j7xvsdfx6R — Breitbart London (@BreitbartLondon) September 14, 2016

The Ontario Review Board held a review on Ali’s case in July and deemed him to still be a significant risk to the public but added that if Ali can control his beliefs, he may be entitled to 48 hours passes to visit family in Toronto.

A similar pass was given to London Bridge terror attacker Usman Khan who murdered two people in November. Khan was out of prison on licence and given special leave to enter the British capital to attend a prisoner rehabilitation event when he began his attack.

Canada also faces a potential threat from returning Islamic State fighters, such as 22-year-old Ikar Mao who has been charged with leaving Canada to join the Islamic State terror group and participate in its activities.

Others, however, have returned to Canada without being charged with any crimes, such as an unnamed Pakistani-Canadian man who told media in 2017 that he regretted travelling to Syria and joining the group.

Terror in Canada: Bloody Police Chase After Man With Islamic State Flag Rams Police Barricade, Stabs Officer https://t.co/HnwT7FdsXI — Breitbart London (@BreitbartLondon) October 1, 2017