A Moncton, N.B., man accused of threatening to kill police has been ordered to undergo a five-day psychiatric assessment to determine his fitness to stand trial.

​Jasper John Stam, 25, remains under an order to have no contact with Justin Bourque, the suspect in the Moncton shootings that left three Mounties dead and wounded two others a week ago.

Jasper Stam

Moncton, N.B., resident Jasper Stam, who is charged with threatening to kill police, has been sent for a psychiatric assessment and will return to court on Monday. (Facebook)

No explanation for the no-contact order was provided in Moncton provincial court on Wednesday during Stam's brief appearance.

Police have said the order is not connected to the ongoing investigation into the June 4 shootings.

But Stam and Bourque appear to have been Facebook friends.

Stam also appeared to show support for Bourque by sharing a link to a commentary entitled "Best of luck, Justin Bourque" last Friday, the day Bourque was arrested.

The following day, a Facebook posting attributed to Stam states: "just got fired for being friends with someone."

Although the post does not refer to Bourque by name, subsequent comments attributed to Stam appear to defend Bourque.

"Justin had no mental illness. he did not do hard drugs. he did not do anyone who deserved respect any wrong. not ever. one of the most respectable of my friends. polite also," the posting stated.

"I'm sorry for the lack of mercy that people are displaying for him and for the friend he lost and for the lack of justice in this world and that he felt it was necessary to take justice into his own hands and set things straight for the family and loved ones of the dead boy."

There has been speculation the post refers to Daniel Levesque, 30, who was shot four times by Codiac RCMP officers in July 2013 and subsequently died.

Jean Cormier is representing Jasper Stam

Defence lawyer Jean Cormier could not say why Jasper Stam has been ordered to have no contact with Justin Bourque. (Kate Letterick/CBC)

​The two officers were recently cleared of any wrongdoing, following a review by the Fredericton Police Force.

An autopsy revealed stab wounds that were received before the shooting were the cause of death and not the four gunshot wounds, Fredericton police announced on May 23, just days before Bourque's alleged rampage.

Two of Bourque's friends, who recently spoke to CBC News, said they had never known him to be friends with Levesque or even mention him.

Stam's purported Facebook page also refers to "police overlords," and says "'good' cops are actually not a real thing."

Stam's defence lawyer, Jean Cormier, told reporters outside the courtroom Wednesday he did not know why his client had been ordered to have no contact with Bourque.

"The impression I have is that the social context in which we are now dealing with respect to this charge is a significant factor on that," he said.

"That was done in the first appearance and the first appearance was on Monday."

Stam is charged with uttering threats to cause death to police officers. The threats were allegedly made between May 10 and 18.

He has been in custody since Monday.

The five-day assessment will determine if a further assessment is required.

Asked if he agreed with a mental-health review, Stam said, "I consent, but I kind of object."

He eventually consented and is scheduled to return to court on Monday for a bail hearing.

Bourque, 24, was arrested early Friday and charged with three counts of first-degree murder and two counts of attempted murder. He is scheduled to return to court on July 3.

The shootings resulted in the deaths of:

  • Const. Fabrice Georges Gevaudan.
  • Const. Douglas James Larche. 
  • Const. Dave Joseph Ross.