The man charged with attempted murder in an attack at UBC last year admitted that he tried to kill the victim, but added that he didn't know what he was doing during the incident.

"I tried to kill her," Thamer Hameed Almestadi admitted in a videotaped interview with RCMP Sgt. Kevin Jeffrey.

"I was not aware of what I was doing at the time," he added.

Almestadi has pleaded not guilty to attempted murder, aggravated assault and assault with a weapon in the 2016 attack that left Mary Hare with serious injuries, including a five-inch-long cut to her throat.

In the hours-long interview that was played in court during day two of Almestadi's trial, the UBC student was at times crying and remorseful, asking the officer if the victim was going to survive.

'Made a mistake'

"Tell her I'm sorry ...Tell her I made a mistake ... I didn't even know why her," he said.

The international student from Saudi Arabia said that he hadn't slept the night before the attack at UBC's Salish House and was feeling overwhelmed by school work in the weeks leading up to the incident.

"I am so behind in school ... I can't get focused in school."

Mary Hare was attacked with a knife in her dorm room at UBC last year. The trial for the accused in the attempted murder case began at B.C. Supreme Court Tuesday. (CBC News )

When asked by Sgt. Jeffrey why he might have attacked Mary Hare with a knife Almestadi said, "I started listening to the Koran and understanding the meanings differently."

"If you read something and your mind is thinking something else, you understand differently."

Almestadi — who was 18 at the time of the incident — said he even began seeing things that weren't real.

"At that point I thought Mary was the devil," he said.

He told the officer he had confided in his mother about the thoughts he was having in the weeks leading up to the attack and had also visited a hospital to see a doctor.

'I know what I did was wrong'

Mary Hare, 20, testified Tuesday that she had only met Almestadi once briefly before the attack in her dorm room.

"I fought him off. I did everything I could have done. I don't have any regrets about what I did ... I know that I was as strong as I could have been," she said in court.

At one point during the interrogation with Sgt. Jeffrey, Almestadi offered to pay for Hare's recovery and medical costs associated with the attack.

"She never did anything to me," he told the officer. "I know what I did is wrong."

Hare — who was also an international student at the time of the attack — has not returned to UBC since.

The trial is scheduled for three weeks with police officers, friends, witnesses and psychological experts expected to take the stand.