A judge ordered a 27-year-old man who allegedly stabbed soldiers at a Canadian Forces recruiting centre in Willowdale in March to undergo treatment for mental illness on Tuesday.

On the afternoon of March 14, a man walked into the recruitment centre on Yonge Street near Greenfield Avenue.

Once inside, police allege the suspect walked past a master corporal who was stationed at the door of the office and then slashed him on his right arm with a “large knife” when he tried to stop him.

The suspect then continued into the office and allegedly attempted to slash a female uniformed Canadian Forces member, who escaped injury.

Military personnel were then able to corral civilian applicants in a safe location and subdue the man until police arrived.

A third uniformed member suffered non-life-threatening knife injuries while attempting to subdue him.

The two injured soldiers were treated in hospital and released the next day.

At the time, Toronto Police Chief Mark Saunders alleged the suspect uttered that “Allah told me to do this, Allah told me to come here and kill people,” at the scene, either during or after the alleged assaults took place.

Ayanle Hassan Ali was charged by Toronto police with three counts of attempted murder, three counts of assault with a weapon, two counts of aggravated assault and one count of weapons dangerous.

Hassan Ali was first ordered to undergo treatment at a psychiatric hospital on March 30, his lawyer Maureen Addie said in an email. His treatment period was extended from 30 days to 60 at the request of the hospital.

In a courtroom at 1000 Finch Avenue West on Tuesday, Justice Riun Shandler said Ali shows “ongoing active symptoms of major mental illness,” during a hearing to determine whether the he was fit to stand trial.

Hassan Ali was ordered to remain in hospital and receive anti-psychotic medication for the next 60 days.

“The goal of the treatment is to render Mr. Hassan Ali fit to stand trial," Addie said.

Addie said another fitness hearing is scheduled for July 29, 2016.

On Tuesday, The Integrated National Security Enforcement Team said the same suspect has been charged with carrying a weapon dangerous to the public, for the benefit of a terrorist group, along with three counts of attempted murder, two counts of aggravated assault and three counts of assault with a weapon.

The new charges laid by the RCMP Tuesday are separate from the ones laid earlier by Toronto Police as they allege the acts were committed "for the benefit of, at the direction of, or in association with a terrorist group."