Toronto police are looking into whether a double stabbing at a military recruitment center might be terror related.

Police Chief Mark Saunders said a man walked into the center in the northern part of Toronto around 3:30 p.m. Monday, pulled out a knife and attacked a uniformed Canadian Forces member at the front desk.

Saunders said others were able to take down the suspect but a second Canadian Forces member was stabbed in the process. The injuries are not believed to be life-threatening.

He said the suspect made unspecified comments that led police to look into a possible terror connection.

"Certain comments were made by this gentleman while he was held in custody before the police arrived which has caused some concern. This has caused us to look at the motive beyond the attack," Saunders said.

Witnesses heard the suspect yell "Allah" or "Ali" at some point during the attack, a police source told the Toronto Sun late Monday. 

“Several heard the man use this terminology. It’s not something you take a chance on and this is why the call was made to the police agencies who handle terror issues," the source said.

The Royal Canadian Mounted Police and Canada's intelligence service have also been contacted.

Saunders said charges against the 27-year-old man are pending. He said it could have been worse.

"We're very fortunate that the Canadian Forces, through their training, responded and as a result had they not reacted it would have been much more serious," he said.

RCMP spokesman Harold Pfleiderer said they are working with Toronto police to determine the circumstances surrounding the stabbing.

"The information we have at this point leads us to believe this is an isolated incident and we wish to reassure the public that there is no imminent threat to public safety at this time," Pfleiderer said in an email.

Law enforcement sources told the Sun they would be looking into the suspect's mental health as well as any affiliations he may have.

Defense Minister Harjit Sajjan tweeted that his thoughts are with the injured soldiers and with those who responded bravely in the face of danger.

In 2014 a gunman killed a Canadian soldier at the war memorial in Ottawa and then stormed Parliament before being shot dead. The man had taken issue with Canada's involvement in war in Afghanistan and against the Islamic State. The attack came two days after a man described as an "ISIL-inspired terrorist" ran over two soldiers in a parking lot in Quebec, killing one and injuring the other before being shot to death by police. The man had been under surveillance by Canadian authorities, who feared he had jihadist ambitions and seized his passport when he tried to travel to Turkey.

Canada's new Liberal government has ended airstrikes against the Islamic State group but has tripled the number of soldiers that train Kurdish soldiers in Northern Iraq.