A man who attacked his university classmates with a baseball bat last year was obsessed with school shootings and violent sex crimes, the ACT Supreme Court has heard.

Key points: Alex Ophel face five counts of attempted murder for a baseball bat attack at the ANU

Alex Ophel face five counts of attempted murder for a baseball bat attack at the ANU Prosecution says Mr Ophel searched "ACT murder laws" on the internet before the attack

Prosecution says Mr Ophel searched "ACT murder laws" on the internet before the attack Mr Ophel's lawyers will argue he was suffering from a mental illness at the time

Alex Ophel, 19, began the attack shortly after arriving at his statistics class at the Australian National University in August last year.

He is now facing five charges of attempted murder.

Prosecutor Shane Drumgold outlined his case on Monday, alleging Mr Ophel carefully planned the attack.

"His conduct makes sense against his history," he told the jury.

Mr Drumgold said the case would draw on evidence from his friends about things he had said about those who had carried out school attacks in the US.

The jury heard a witness will tell them about how after watching a documentary about the Columbine killings at school, Mr Ophel told a friend he sympathised with the killers and he could see himself killing someone.

Mr Drumgold said Mr Ophel did several internet searches the day before the attack under topics including: "How easy is it to kill someone with a baseball bat?", "ACT murder laws" and "ACT life sentences".

Mr Ophel had also looked up Islamic State beheadings and white supremacist sites.

Mr Drumgold told the court Mr Ophel had also posted the night before on the website 4Chan, which said: "If I were you I'd keep an eye out down under. It's going a bit batty at this time of the year."

He said the post was accompanied by a picture of a baseball bat.

Ophel had 'a detailed plan': prosecution

In addition, Mr Drumgold said he had posted messages to individuals.

"He was clearly getting ready to carry out a detailed plan," he said.

Mr Drumgold said later interviews showed that the plan was to kill everyone in the room leaving one woman, who he planned to rape.

He said Mr Ophel had been a gifted school student, who was also good at sport, but things had not gone well at university.

He told the court Mr Ophel was also frustrated by an unrequited relationship, all of which had snowballed into the planned attack.

Mr Ophel's lawyers will argue he was suffering a mental illness at the time.

The court is expected to hear from several psychiatrists who have treated Mr Ophel since the incident.