The suspect charged in the stabbing deaths of five young people at a house party in Calgary last month has been declared fit to stand trial.

Matthew de Grood appeared before a judge via closed-circuit television Thursday after undergoing a 30-day psychiatric evaluation. The evaluation was ordered following his arrest, in order to determine his fitness for trial.

De Grood has been referred back to the Southern Alberta Forensic Psychiatry Centre until doctors declare that his mental health has improved.

His lawyer, Allan Fay, told reporters outside court that de Grood is “doing as well as can be expected” under the circumstances.

Asked why de Grood was declared fit to stand trial but referred back to a psychiatric facility, Fay said: “You have to keep in mind that being fit to stand trial only means that he understands the process and he can instruct counsel.

“You can still be very profoundly mentally ill and be fit to stand trial.”

Kaiti Perras, 23, Jordan Segura, 22, Zackariah Rathwell, 21, Josh Hunter, 23, and Lawrence Hong, 27, were stabbed to death on April 15 during a house party to mark the end of university classes.

Two of the victims, Hunter and Rathwell, were best friends and were in a band together called Zachariah and The Prophets.

Perras had majored in English at Mount Royal University before attending the University of Calgary, while Hong was about to graduate from the urban studies program. Segura had been working part-time at two Calgary funeral homes.

Police have not said if they have a motive for the killings, but have confirmed that de Grood had been invited to the party and was mingling with guests before the attack.

Less than a week after the stabbings, de Grood’s father, a veteran Calgary police officer, said he had no idea what motivated the attack and described his son as a “great kid” who was full of “love, kindness and respect for others.”

De Grood, 22, is charged with five counts of first-degree murder in what’s been described as the worst mass murder in the city’s history.

Another court date has been set for July 22, giving Fay two months to go through all the police evidence and witness statements provided by the Crown.