OTTAWA -- The gunman who stormed Parliament Hill in 2014 would have had a difficult time pleading insanity had he lived to face charges, says the top Mountie.

But RCMP Commissioner Bob Paulson acknowledges Michael Zehaf Bibeau could have benefited from mental-health counselling before the rampage that saw him die in a hail of bullets.

A rifle-toting Zehaf Bibeau, 32, raced into Parliament's Centre Block in October 2014 after fatally shooting Cpl. Nathan Cirillo, an honour guard at the nearby National War Memorial.

Shortly before his attack, the gunman made a video in which he cited retaliation for Canada's military involvement in Afghanistan and Iraq as his motivation. There is no evidence he was under the direction of an organized group.

Paulson told a Commons committee last year that the Mounties considered Zehaf Bibeau a terrorist and that he would have been charged with terrorism offences under the Criminal Code had he survived.

At a conference of the Canadian Association for Security and Intelligence Studies on Friday, Paulson elaborated on his view of the likely outcome of a prosecution involving Zehaf Bibeau.

"There's no question he had mental problems. No doubt," Paulson said. "And there's no doubt he had drug problems. And if we could have gotten to him earlier, maybe we would have prevented this thing.

"For me, in that context, the test is, what will a court say? Had we not killed him, we'd have charged him. And then he'd have to say, 'Look it, I was so crazy, I didn't know what I was doing.'

"I don't think that's the case. But I do think that he had some issues that could have benefited from some help and some of the resources and programming that exists in the country."

Paulson told the conference, which focused on the threat posed by the extremist Islamic State of Iraq and the Levant, that whatever the particulars of Zehaf Bibeau's case, many who are susceptible to the ISIL message do suffer from mental-health issues.

That's why it is important for police and security agencies to identify such people at an early stage and ensure health professionals assist them, he said. "Let's find them, and let's help them before we have to find them and arrest them, or get into a shootout with them."

The Canadian intelligence community has embraced collaboration and collective action as the best means of tackling threats such as ISIL, Paulson said. But there's a need to continually increase co-operation.

The commissioner said that after Zehaf Bibeau's attack and another jihadi-inspired assault just days earlier in St-Jean-sur-Richelieu, Que., he told his commanding officers that any "remotely foreseeable" plot must be thwarted.