Hours before he stabbed five people to death at a house party, Matthew de Grood sent ominous messages and told friends he thought the end of the world was imminent, court heard as his murder trial began Monday.

De Grood, who had garlic stuffed inside his clothing at the time of his arrest, posted messages online talking about killing vampires, according to an agreed statement of facts.

The 24-year-old pleaded not guilty to five counts of first-degree murder but did admit he stabbed the victims — Lawrence Hong, 27, Joshua Hunter, 23, Kaitlin Perras, 23, Zackariah Rathwell, 21, and Jordan Segura, 22 — at a home in the northwest Calgary community of Brentwood, in April 2014, causing their deaths.

De Grood's legal team is expected to present a not criminally responsible defence.

The trial is being held in Court of Queen's Bench in front of a judge alone.

The courtroom was so full today, two more were required to accommodate the overflow.

Court heard de Grood sent text messages to his boss at a Calgary grocery store shortly before the stabbings, with cryptic statements like "Trust that I never hurt anyone," and "All will be known," and in one case, a numeral: "5."

His mental state at the time of the slayings is expected to be a big part of the trial.

De Grood's father, a 30-year veteran of the Calgary Police Service, considered swearing a mental health warrant in the days before the killings as he and his wife had become increasingly concerned about their son's apparently deteriorating mental health.

Matthew de Grood admitted in court today that he killed five people by stabbing them to death, but pleaded not guilty to five counts of first-degree murder. (Canadian Press)

Brendan McCabe, a childhood friend of de Grood's, had similar concerns, according to the statement of facts read by Crown prosecutor Neil Wiberg.

McCabe invited de Grood to the party. On their way there, McCabe told police that de Grood talked about conspiracy theories, hidden meanings in songs, patterns in the Matrix movies and spoke of U.S. President Barack Obama being "the Antichrist."

Victims' families 'lost so much'

Before the trial began, Gregg Perras, Kaitlin's father, spoke on behalf of the victims' families outside the Calgary Courts Centre.

"We are here to represent the voices of the victims — our loved ones who had their futures taken away and cannot represent themselves," he said. "And we are also here to support one another in our profound loss."

Perras said the last two years have been "extremely difficult, incredibly long and anxiety-ridden" for the families that "lost so much that terrible night."

"It is immeasurable to comprehend the anguish and sorrow we have experienced over the last two years," he said. "Only those who have experienced significant loss can relate."

'Crazy theories'

According to the agreed statement of facts, childhood friend Daniel Butler told police he and de Grood went for a walk the night of the party and his old friend spoke of "crazy theories" and how he believed the world would end at midnight.

Other friends had also noticed strange Facebook posts by de Grood in the weeks prior to the stabbings — things about killing vampires by stabbing them in the heart and being "the good Darth Vader."

Laura York, a friend of de Grood's from junior high, told police she saw de Grood at the party speaking with Rathwell about his band, and about de Grood heading to law school.

Around 12:30 a.m, some of the party guests were gathered around a fire outside when Riley Lindenaar saw de Grood place his cellphone on an axe blade and drop it in the fire.

Lindenaar got the phone out of fire but de Grood grabbed it, smashed it with the axe and threw it away with no explanation.

McCabe said de Grood complained that his parents thought he was going insane and wanted him to get help and go on medication. He also said the end of the world was coming at midnight and spoke of "purification" and "jihad."

Around 1 a.m. McCabe left the house with three others to get food at McDonald's.

The attack

When they returned to the house about 20 minutes later, they heard screaming.

Hunter came running out of the house with de Grood chasing after him, court heard.

Hunter told them de Grood had a knife, before collapsing on the front lawn, where friends began trying to save his life.

McCabe chased after de Grood. The knife and de Grood's hands were covered in blood.

"It's the night of the long knives," de Grood said, turning to McCabe before throwing the knife on the ground and running again.

A short distance later, McCabe caught up with de Grood, shoving him against a parked truck. He told investigators de Grood wiped his bloody hands on him and said they were "blood brothers."

Then de Grood reached into his pocket for a box cutter he'd brought from work and told McCabe to back off or he'd be next.

McCabe complied and returned to the house where Hunter was clinging to life on the front lawn. Inside, Segura, Rathwell and Hong were already dead. Perras was also critically wounded, and friends were trying frantically to save her and Hunter.

There were about 25 people at the peak of the party and, once the group left for McDonalds, only about six or seven remained, according to the statement of facts.

Seemed to feel no pain during arrest

Police responding to the home found two knives: one in a nearby dumpster and a bloody kitchen knife on the sidewalk down the block from the home where the party had been held.

Officers tracked down de Grood and tried using a police dog in their first attempt to take him down, court heard. But de Grood punched the dog and ran away.

Moments later, de Grood ran at an officer who had his gun drawn. He'd later tell police he wanted the officer to shoot him.

The officer could see the suspect was unarmed, and deployed the dog for a second attempt at taking de Grood down, which was successful, according to the statement of facts.

The dog's handler would later surmise that de Grood seemed to feel no pain and described him as being "like the Incredible Hulk."

One of the arresting officers who was holding de Grood's legs could feel something in his sock and pulled out a mesh bag with a clove of garlic inside. Another clove was discovered in his jacket pocket.

"It was to keep the zombies away," de Grood told police.

'I had to kill them'

While in an ambulance en route to the Rockyview Hospital, de Grood had more to say to police.

"I'm sorry, I had to kill them," he said.

Court also heard he told paramedics at one point that he was born in an incubator and was an alien, and that killing people in self defence is just and fair.

At the hospital, de Grood told officers he was being controlled by the sun god and was trying to kill werewolves.

"I tried to kill them as quickly, as quickly and humanely as I could, but they were struggling," de Grood told police, according to the statement of facts.

After de Grood used the washroom at the police station, he asked an officer to cuff both hands.

"I realize what I was capable of and I don't want to have the opportunity to do that again," he said, according to the statement of facts.

The trial will resume on Tuesday. Crown prosecutor Neil Wiberg would not say whom the court is expected to hear from, but he did say whatever takes place will not be in the form of sworn evidence.

On Monday morning, Kaitlin's father, Greg Perras said tributes to each of the victims would take place during the trial.

Follow the trial live via our reporters in the courtroom: