CALGARY -- A Calgary man heard what he thought was the voice of the devil before he stabbed five people to death at a Calgary house party two years ago, says a psychiatric report introduced Wednesday at his murder trial.

Matthew de Grood, 24, told a psychiatrist that he believed a war was about to begin, signalling the end of the world, when he arrived at the party in northwest Calgary in April 2014.

"He heard a male voice, who he thought was the devil, telling him to 'kill them before they get you,' " reads the report prepared by Dr. Lenka Zedkova, a psychiatrist at Alberta Hospital Edmonton.

"He advised us he could not converse with the voice but it was directing him and warning him about others."

De Grood, 24, admitted to stabbing the victims to death in an agreed statement of facts read at the beginning of his trial on five counts of first-degree murder.

But his lawyer has pleaded not guilty on his client's behalf, saying he isn't criminally responsible.

A forensic psychiatrist also testified Wednesday that de Grood suffered a "psychotic episode" before the attack.

Dr. Alberto Choy, the director of forensic psychiatry at the hospital, testified that he believes de Grood suffers from schizophrenia, a severe form of bipolar disorder, or a combination of both.

"He was unable to determine what he was doing was morally wrong," said Choy, who was called to testify by the defence.

"It was my opinion that he was suffering from a mental disorder. There's little doubt in my mind he was psychotic at the time."

Killed in the attack were Kaitlin Perras, 23; Lawrence Hong, 27; Josh Hunter, 23; Zackariah Rathwell, 21; and Jordan Segura, 22.

In the psychiatric report, De Grood said he thought he had to attack Rathwell, a budding young musician, before Rathwell attacked him, Choy testified.

Court heard that de Grood grabbed a chef's knife with a 21-centimetre blade from a knife block in the kitchen before killing Rathwell and the other four victims who he believed "were on the side of evil."

Choy said he considered the possibility that de Grood -- the son of a veteran Calgary police officer -- might be trying to fake insanity but there was a "mountain of evidence" indicating that wasn't the case.

Outside court, defence lawyer Allan Fay said he realizes not everyone is going to believe his client is not criminally responsible.

"No matter what we do there's going to be certain members of the public who aren't satisfied," said Fay.

"My client's not getting any special breaks because his father is a police officer. My client isn't trying to avail himself of some trumped up defence. My client was mentally ill when this occurred to the point that he was incapable of appreciating the moral wrongness of what he was doing."

In the agreed statement of facts, de Grood told police after his arrest that he didn't have a choice in his actions.

"I tried to do it mercifully. I aimed for their heart. They put up a struggle which made it hard, but so you know it wasn't sadistic or anything," he told investigators.

"I didn't enjoy killing at all. I said sorry, but the son of God was controlling me."