A judge has ruled that a man is unfit to stand trial, just hours after he was charged with terrorism in connection with a March stabbing at a Toronto armed forces recruiting centre.

Judge Riun Shandler of the Ontario Court of Justice has ordered Ayanle Hassan Ali to undergo 60 days of treatment, in order to improve his condition so that he may be tried. The judge’s decision follows a two-month psychiatric evaluation.

Lawyer Maureen Addie said Tuesday that the judge had found her client unfit for trial “due to the ongoing psychotic symptoms of a major mental illness."

Ali, 27, was charged earlier Tuesday with three counts of attempted murder, two counts of committing assault causing bodily harm, three counts of committing assault using a weapon, and one count of carrying a weapon dangerous to the public, for the benefit of a terrorist group.

These latest charges are in addition to charges laid by Toronto police in March in connected with a double stabbing at an armed forced recruiting centre.

"Terrorism-related charges require a significant investigation, which can be time-consuming,” Assistant Commissioner Jennifer Strachan, Commanding Officer of RCMP 'O' Division, said in a statement released Tuesday.

Police said, on March 14, a man holding a knife walked into a government building and attacked two uniformed soldiers. Other military personnel were able to subdue him.

At the time, Toronto Police Chief Mark Saunders, cited witness accounts of man saying, after the stabbing, "Allah told me to do this; Allah told me to come here and kill people."

CTV News later learned that the suspect had briefly worked as a ramp agent at Pearson International Airport, where he handled baggage and loaded aircraft for a contractor.

Ali was born in Montreal and moved to Toronto in 2011.

With files from The Canadian Press