A UBC student who attacked another student with a knife last year has been found not criminally responsible.

B.C. Supreme Court Justice Margot Fleming concluded that Thamer Almestadi was likely suffering from a psychotic episode when he cut dorm mate Mary Hare in the throat at UBC's Salish House residence Oct. 4, 2016.

<a href="https://twitter.com/hashtag/breaking?src=hash&ref_src=twsrc%5Etfw">#breaking</a>: Justice Fleming finds Thamer Hameed Almestadi not criminally responsible —@stephmer

Almestadi, 19, had pleaded not guilty to attempted murder, aggravated assault and assault with a weapon.

He asked the court to find that he was suffering from a mental disorder at the time of the attack.

Hare, now 20, was left with serious injuries, including a five-inch-long and one-inch-wide slash to her throat.

In an RCMP video-taped interview, Almestadi admitted he tried to kill Hare but claimed he didn't know what he was doing at the time.

The international student from Saudi Arabia said he hadn't slept the night before the attack and was feeling overwhelmed by school work.

Mary Hare was seriously injured by a knife-wielding Almestadi in October of 2016. (CBC News )

The court heard that Almestadi had stopped attending classes and had been hearing voices.

On the night of the attack, he had been listening to an audio recording of the Quran and believed God was instructing him to kill Hare, who he barely knew.

Hare, an international student from the U.S., testified Almestadi knocked on her door and when she opened it, he jumped on her and started cutting her throat with a knife.

She was able to fight him off until two other students intervened and put Almestadi in a chokehold.

In her decision, Justice Fleming said there was no disputing the material facts of the case. She also said there was no evidence Almestadi had any motive other than his delusional belief.

Crown is asking Almestadi be detained at the Forensic Psychiatric Hospital in Coquitlam.

With files from Stephanie Mercier