A former Australian National University student who attacked his classmates with a baseball bat is facing five counts of attempted murder in the ACT Supreme Court.

Key points: Alex Ophel is charged over an attack that took place at the ANU campus in August 2017

Alex Ophel is charged over an attack that took place at the ANU campus in August 2017 He had posted to YouTube in the hours before, predicting the attack, the prosecution said

He had posted to YouTube in the hours before, predicting the attack, the prosecution said The defence argued Mr Ophel's actions were those of someone who was mentally ill

Alex Ophel, 19, pleaded not guilty to the August 2017 attack by reason of mental impairment.

He admitted the attack took place but claimed he was suffering a psychotic episode at the time and believed he was being driven by a higher power.

ACT Director of Public Prosecutions Shane Drumgold outlined a case challenging that account, pointing to evidence contained in internet searches Mr Ophel allegedly made in the lead-up to the attack, YouTube videos and a post on the site 4chan, in which he predicted the attack.

The post stated: "If I were you I'd keep an eye out down under, it's going to get a bit batty down here."

The post was accompanied by a picture of a baseball bat.

Mr Drumgold told the jury Mr Ophel also had a deep interest in an American, Elliot Rodger, who was responsible for shooting six people at the University of California in 2014.

"Certainly he had an interest in school killers," Mr Drumgold said.

Alex Ophel is charged with attempted murder of an attack on his classmates with a baseball bat in 2017. ( YouTube: Thane Jekyll )

In other evidence, in the hours before the incident Mr Ophel had used Google to search "ACT murder laws", "ACT life sentences", and ISIS beheading videos.

"We say this is a conditioning process he went through," Mr Drumgold said.

Mr Ophel had also used a YouTube channel with the name Thane Jekel to publish a series of posts, the last of which was played to the jury today.

"You will see him unmedicated — there is not a single sign of overt psychosis," Mr Drumgold said.

He told the jury that Mr Ophel was not only in control of his conduct at the time, but had been planning it.

But Mr Ophel's lawyer John Purnell told the jury they would have a very different impression of the material when they saw it.

"You make up your own mind," Mr Purnell said.

"Are you looking at someone who is acting normal... or do you see someone with a mental illness?"

Mr Purnell said the material in the case would be confronting.

"It's clearly the product of a person that's mentally ill," he said.

Mr Purnell said they would present evidence from several psychiatrists that showed his client met the criteria for someone who was mentally impaired.