The suspect in Calgary's worst mass killing is mentally fit to stand trial for first-degree murder in connection with a stabbing rampage at an end-of-school house party last month that left five young people dead, a psychiatric assessment has concluded.

Matthew de Grood, 22, appeared briefly in court via closed circuit TV‎ on Thursday and stood motionless while a judge ruled he would remain in custody at the secure psychiatric facility where he has been housed for most of the time since the April 15 murders. He was dressed in a blue prison jumpsuit.

Police say four men and a woman were killed at an end-of-school celebration at a rented house near the University of Calgary when ‎the suspect grabbed a knife and attacked party-goers. The violence shocked people who know Mr. de Grood, the son of a senior Calgary police officer and, by all accounts, a good student who had been set to start law school in the autumn. He faces five counts of first-degree murder.

Story continues below advertisement

He was ordered at his last court appearance to undergo a 30-day psychiatric assessment to determine if he could navigate the rigours of a lengthy trial, including instructing his lawyer. The fitness finding has no bearing on what his defence will be, said his lawyer, Allan Fay. Mr. de Grood is due to return to court on July 22.

Mr. Fay said his client still requires treatment at the Southern Alberta Forensic Psychiatry Centre, where he is in custody, despite the certification by Reilly Smith, the forensic psychiatrist in charge of the evaluation. His illness has not been disclosed.

"You have to keep in mind that being fit to stand trial only means that he understands the process and can instruct counsel. You can still be very profoundly mentally ill and fit to stand trial," Mr. Fay told reporters.

In his report, Dr. Smith recommended the court consider having Mr. de Grood evaluated for criminal responsibility in the attacks, although he stopped short of providing an opinion on that before a trial, citing his lack of knowledge of all the facts.

"If we have good psychiatric evidence indicating that my client is not criminally responsible, then ultimately he cannot be found guilty of these offences," Mr. Fay said in an interview, stressing that his defence strategy is still in the very early stages.

The prosecution gave Mr. Fay a computer hard drive on Thursday with thousands of pages of police evidence and video statements from witnesses, which he will pore over in the coming weeks to develop his defence as well as determine what might happen at the next court date.

Mr. de Grood has been allowed visits with his family, including his father, Inspector Doug de Grood, a 30-year police veteran, and mother, Susan de Grood. Two days after the attacks, the couple fought back tears as Inspector de Grood expressed sorrow and condolences to the families of the victims – Jordan Segura, 22; Kaiti Perras, 23; Josh Hunter, 23; Zackariah Rathwell, 21; and Lawrence Hong, 27. He described their son as "a great kid, full of love, kindness and respect for others" and said they were struggling to understand what happened.

Story continues below advertisement

At the next court appearance, a date may be set for a preliminary inquiry to determine if there is enough evidence to go to trial, said Neil Wiberg, the Edmonton-based Crown prosecutor for the case.

"At that point, both the defence and Crown will have gone through all the disclosure and know how many days it will take for a preliminary inquiry," Mr. Wiberg said.

Mr. Fay said Mr. de Grood is faring as well as could be expected for a man in such serious straits. "He's obviously worried and apprehensive about what's happening and what will happen, but other than that he seems as good as he can be," he said.