Three students and a lecturer have been injured in an attack by a baseball bat-wielding student in an Australian National University (ANU) classroom.

Police said an 18-year-old man stood up from his seat and assaulted the female lecturer at the front of the class with the bat.

Three other students were injured when they tried to intervene.

The man has been taken into custody and police said there was no ongoing threat to public safety.

Loading

Those at the scene have been comforting each other in the wake of the attack and the university is offering counselling.

"Other students in the class have intervened and have attempted to restrain the student with the baseball bat," acting deputy chief police officer Ben Cartwright said.

"[It showed] incredible bravery on behalf of those students to protect the lecturer."

Detective Superintendent Cartwright said the man was restrained by campus security until police arrived.

He confirmed the man assaulted four people - one male student, two female students and the female lecturer - and said none had life-threatening injuries.

"They appear to be defensive injuries, we believe [there are] a couple of broken bones, a broken arm," he said.

They were all taken to the Canberra Hospital.

Later on Friday the ANU released a statement to staff and students saying two of the four patients had been discharged from hospital and the two others would remain at Canberra Hospital to receive ongoing care for minor injuries.

Detective Superintendent Cartwright said the man was not known to police or any intelligence agency.

"It is too early to know the motivation behind this alleged assault and at this stage ACT Policing have not ruled anything out," he said.

'Help, we need help'

A student in the classroom at the time of the attack said there were between 10 and 15 people in the class.

Witnesses say several people have been injured in the incident. ( Twitter @Jolene_Laverty )

"Many people [got] hurt ... [they were] bleeding there, but he [was] still doing that," she said.

"I was running and shouting 'help, we need help'.

ANU's deputy vice-chancellor Marnie Hughes-Warrington said the incident happened at the Copland precinct.

"It would have been [confronting] for anyone who witnessed it," she said.

"The most important thing is to make sure anyone who was near the incident [is] being looked after, and that is the case."

Professor Hughes-Warrington said the event was "shocking for everyone" considering Canberra was a caring community.

ANU students received an email from the university alerting them of the incident and assuring them that the perpetrator was removed from campus and detained by police.

The university said it would step up security for its open day on Saturday.

Police are calling on anyone who witnessed the incident to contact them on 131 444.