Toronto's police chief says the man facing charges in the stabbings of two members of Canada's military said Allah instructed him to go to the recruitment centre in the city's north end and carry out the attack.

The 27-year-old suspect, a Canadian citizen who was born in Montreal, is facing several charges, including one count of attempted murder and one of aggravated assault.

Chief Mark Saunders said the man walked past a master corporal stationed at the door of the centre on Monday afternoon and then stabbed him when the soldier tried to stop him. He then stabbed another military member who tried to apprehend him.

Saunders quoted the man as saying: "Allah told me to do this, Allah told me to come here and kill people."

The suspect in the case, Ayanie Hassan Ali, will appear in court later today to face charges.

The suspect was unresponsive when questioned, Saunders said, adding there was nothing to indicate he is affiliated with any terrorist organizations. The police chief urged the public against any anti-Islam sentiment in the wake of the attack.

Saunders said the suspect has no previous criminal record, and appealed to the public for any tips or information because he's not co-operating with police.

A spokesman at the recruiting centre said no one had observed an "unusual activities" prior to the attack.

"Obviously it's not something we see on a daily basis, however we are professionals and we always have to take care of our own people," said Major Richard Silva. He added it was "business as usual" today at the facility.