A British Columbia man accused of posting terrorist propaganda online mourned two attackers who were shot dead by police after killing Canadian soldiers in 2014, an expert witness for the Crown has testified.

A trial for Othman Hamdan of Fort St. John has begun in B.C. Supreme Court with RCMP Const. Tarek Mokdad, an expert in Islamist-inspired terrorism and so-called "lone wolf" attacks, describing several posts on the man's Facebook page.

Hamdan has pleaded not guilty to encouraging the commission of murder, assault and mischief, all for terrorist purposes. He has also entered a not guilty plea to inducing and instructing someone to carry out a terrorist act.

Expert witness discusses Facebook posts

Mokdad said after two Canadian military members were killed in separate terrorist attacks in Quebec and Parliament Hill in October 2014, posts appeared on Hamdan's Facebook page calling the attackers "brother" and "martyr."

He also discussed images and messages that appeared to be promoting the Islamic State of Iraq and the Levant, including the use of a social media hashtag used by members of the terrorist group.

It was unclear whether Hamdan was accused of being the author of the posts himself or sharing posts written by someone else.

One of the posts appeared after Martin Couture-Rouleau rammed a car into two Canadian Forces members in Quebec on Oct. 20, 2014, killing warrant officer Patrice Vincent. Couture-Rouleau was later shot by police.

"A Muslim brother is martyred by the Canadian police after he killed (a) Canadian soldier in retaliation to Canada's crimes in Iraq," the post said, as read aloud by Crown counsel Lesley Ann Kilgore.

Mokdad testified that in the view of ISIL, martyrhood is the absolute highest honour one can attain.

"A martyr means God has chosen you to be a martyr. It's not up to you to be a martyr. You aspire to be a martyr," he said.

"A martyr is promised, in Islam, the highest, most honorific status in paradise. There is nothing better than a martyr."

Testimony to continue Friday

Two days later, Michael Zehaf-Bibeau stormed Parliament Hill in Ottawa after killing Cpl. Nathan Cirillo at the National War Memorial. ISIL claimed responsibility for the attack, Mokdad testified.

The post on Hamdan's page on Oct. 22, 2014, appears in both English and Arabic, said Kilgore.

"A Muslim brother martyred today in attack of Parliament with a rifle, shooting politicians inside," the post read.

Hamdan was arrested in Fort St. John in July 2015 for alleged offences dating back to the previous September.

An RCMP statement at the time of his arrest said the propaganda included instructions to kill in the name of jihad.

Mokdad is the only witness for the Crown and is expected to continue his testimony Friday.