Michael Zehaf-Bibeau, the slain 32-year-old suspected killer of a Canadian Forces soldier near Parliament Hill, was a labourer and small-time criminal – a man who had had a religious awakening and seemed to have become mentally unstable.

Mr. Zehaf-Bibeau was born in 1982 and was the son of Bulgasem Zehaf, a Quebec businessman who appears to have fought in 2011 in Libya, and Susan Bibeau, the deputy chairperson of a division of Canada's Immigration and Refugee Board. The two were divorced in 1999.

Ms. Bibeau did not answer e-mails Wednesday, and staff at her offices declined to comment. No one answered the door at her Montreal townhouse. Mr. Zehaf also could not be reached.

Story continues below advertisement

Mr. Zehaf-Bibeau grew up in Eastern Canada, including Ottawa and Montreal, and had spent time in Libya before moving to Western Canada to become a miner and labourer, according to friend Dave Bathurst.

Mr. Bathurst said he met Mr. Zehaf-Bibeau in a Burnaby, B.C., mosque about three years ago. He said his friend did not at first appear to have extremist views or inclinations toward violence – but at times exhibited a disturbing side.

"We were having a conversation in a kitchen, and I don't know how he worded it: He said the devil is after him," Mr. Bathurst said in an interview. He said his friend frequently talked about the presence of Shaytan in the world – an Arabic term for devils and demons. "I think he must have been mentally ill."

Mr. Bathurst last saw Mr. Zehaf-Bibeau praying in a Vancouver-area mosque six weeks ago. He spoke of wanting to go to the Middle East soon.

"He wanted to go back to Libya and study," Mr. Bathurst said. He urged his friend to make sure study was on his mind and "not something else."

Mr. Zehaf-Bibeau insisted he was only going abroad with the intent of learning about Islam and to study Arabic.

Mr. Zehaf-Bibeau was blocked from fulfilling those plans. Sources say he intended to travel abroad, but he had not been able to secure a valid travel document from federal officials, who have been taking measures to prevent Canadians from joining extremists overseas.

Story continues below advertisement

His father's history offers a hint of what Mr. Bathurst was concerned about. In 2011, a Montrealer named "Belgasem Zahef" was quoted in a Washington Times dispatch from the front in Libya, where he had travelled to join the rebel fight. The man described being detained at the Zawiyah oil terminal, where he witnessed torture.

At the Burnaby mosque, Mr. Bathurst said his friend's "erratic" behaviour – he did not elaborate – caused frictions with the elders at the house of worship, who asked him to stop attending prayers. At that time, Mr. Zehaf-Bibeau was living in a barely furnished single-room apartment.

Mr. Bathurst said he recalls his friend being arrested at the mosque a few years ago after bizarrely calling police to tell them about a crime he had committed many years before.

Vancouver lawyer Brian Anderson defended Mr. Zehaf-Bibeau after he was charged for a 2011 robbery.

"He was charged with robbing somebody and he pled guilty to uttering a threat," he said. "It was something fairly minor and fairly bizarre."

Mr. Zehaf-Bibeau underwent a psychiatric assessment at Surrey Pretrial and was "found fit – not certifiable per overnight assessment."

Story continues below advertisement

Mr. Anderson declined to discuss the case further or to describe Mr. Zehaf-Bibeau, who on Feb. 22, 2012, was sentenced to one day in jail.

Some of the facts of Mr. Zehaf-Bibeau's life bear broad parallels to another Canadian terrorist who surfaced this week – Martin Couture-Rouleau, another "high-risk traveller" who police shot dead in Quebec Monday after he ran down two soldiers.

But while Mr. Couture-Rouleau is not known to be connected to any other terrorism suspects, Mr. Bathurst said his friend knew Hasibullah Yusufzai, a Vancouver-area resident who was charged in July by the RCMP with travelling to Syria with the intent of joining a deadly terrorist group.

Authorities have issued an international warrant for Mr. Yusufzai, but he remains at large.

Mr. Bathurst said he believes the two cases are distinct. "I don't think they were linked," he said, explaining how the Canadian Security Intelligence Service had called him to ask about Mr. Yusufzai but not Mr. Zehaf-Bibeau.

With reporting from Tu Thanh Ha in Toronto and Andrea Woo and Mark Hume in Vancouver