Some call it "lone wolf" terrorism, but viral terrorism might be more accurate. The violent and nihilist ideology of terror organizations like the Islamic State and, before it, al-Qaeda, has gone airborne and can infect individuals across the planet. There is no need for direct contact with carriers; it is transmitted via the Internet now. And, as Canada has learned, it can be fatal.

Two men attacked and killed two Canadian soldiers two days apart this week. One of the killers, Michael Zehaf-Bibeau, ambushed and shot a reservist standing on guard at the National War Memorial in Ottawa on Wednesday and then ran into the Parliament Buildings armed with a rifle, where he died in a gun battle. Martin Couture-Rouleau ran over two soldiers in Saint-Jean-sur-Richelieu in his car on Monday and killed one of them, before being shot to death by police. Both men were carrying out the kind of violent, random acts prescribed by Islamic terrorist leaders.

Prime Minister Stephen Harper has labelled the killings as terrorism. Our government is playing these attacks as if the IS had landed on our shores, and as if blunt defiance is the only acceptable response. On Thursday, Mr. Harper restated his desire to push through laws that will further criminalize potential terrorists before they act, and give authorities more power to detain people behaving suspiciously.

Story continues below advertisement

People outside his government are being more cautious, however; not all the facts are known yet. Certainly, Mr. Couture-Rouleau's case has the hallmarks of a young man who converted to Islam and became self-radicalized over time. He was one of 90 radicalized Canadians on an RCMP watchlist; his passport had even been seized. Mr. Zehaf-Bibeau's case is less clear; he was a drug addict and drifter, as well as a devout Muslim with a criminal past and a record of erratic behaviour. He was not on the RCMP's watchlist.

The fact that one of the killers was known to police and was even interviewed by them less than two weeks before he went on his rampage, while the other suspect was on no one's radar, is evidence that the government's current policies are a failure. It also suggests that the law-and-order response preferred by Mr. Harper may be simplistic. Policies based only on the criminalization of young people who fall into the black hole of Islamic radicalization may not be enough. More laws and increased policing powers can't do it all. This is something that other countries have figured out.

Take Germany, for instance.

Stung by playing host to an al-Qaeda cell that was part of the 9/11 atrocities, and after seeing subsequent attacks in European cities carried out by what appeared to be otherwise well-adjusted young men, Germany launched programs aimed at preventing the radicalization of young Muslims. The programs are similar to ones designed to prevent Germany's youth from falling into the neo-Nazi camp. According to news reports, one program alone has helped more than 500 young Germans escape the clutches of the far right and also pulled dozens of young Muslims back from the brink of Islamic radicalism. It is easy to see how something like that could have been a useful – maybe even game-changing – addition to the police surveillance that Mr. Couture-Rouleau was under.

Germany has also launched a national hotline that people can call when they are worried that a family member or friend is being drawn in by radical Islam, either through active recruitment or via the Internet. A similar hotline might have helped in the case of Mr. Zehaf-Bibeau. Friends and acquaintances say he appeared to be mentally ill and spoke of wanting to go to Syria or Libya. As well, Mr. Zehaf-Bibeau was asked to stop attending a mosque because of his erratic behaviour. Had a friend or someone at the mosque been able to call a single, national number to raise the alarm, the RCMP might have been aware of his movements.

The unspoken issue in this week's events is the link between mental illness and radicalization. Studies have shown that people suffering from anxiety or depression are more prone to sympathize with violent protest and terrorism than those not afflicted by mental illness. That said, it's a huge leap from depression to the devastating anomie that leaves a person so lost and angry that they become vulnerable to the death cult of radical Islam. The vast majority of people suffering mental illness will not go that far. It is only the most severe cases that pose a danger; we're talking about individuals who are suicidal or homicidal, or both. And even if they do get to such a state, they may not seek comfort and meaning in a new religion or violent ideology.

When they do, however, it can be a deadly mix. So if converting to Islam and following terrorist organizations online are signposts of danger ahead, that is all the more reason for authorities to try to treat a person's underlying issues before things get out of control. Muslim groups have organized programs along those lines here and there across Canada – they are trying to provide a counternarrative to the terrorists' online hate-mongering – but it is not a co-ordinated national effort.

Story continues below advertisement

Canada is woefully behind on this issue. Britain, which has had a poor record of preventing radicalization, funds programs that link young Muslims at risk with police, health and education services for the simple reason that it works, even if there is not enough of it. And Denmark, unlike us, is no longer locking up young jihadists who return home from Syria and other trouble spots. Instead, it is offering them free psychological counselling and helping them land jobs or get an education. It's a controversial experiment, but the Danes believe it's working.

Mr. Harper, meanwhile, wondered in Parliament this week what "weakness" would lead two Canadian men to turn on their country. But then he added that that was a question for another day.

That day is here.