An unstable man slashed a stranger's throat with a machete in Belconnen on Thursday night, before bystanders tackled him to the ground as he attacked a taxi driver.
Prosecutors said it was only the bravery of members of the public that prevented Imran Hakimi, 32, from random killings outside the Commonwealth Superannuation Scheme building in Canberra's north last night.
Hakimi allegedly took a machete and a paring knife to the corner of Cameron Avenue and Chandler Street about 11.20pm, and began randomly attacking cars as they drove past.
He ran towards the front passenger side of one woman's vehicle and began striking the window and door frame with the machete, according to court documents.
Hakimi opened the door and allegedly held the knife against the woman's throat, while screaming in a language she could not understand.
The knife caused a cut to her throat, but prosecutors say it was not deep enough to cause serious injury.
The woman managed to unbuckle her seatbelt and push the knife back towards Hakimi, before opening the driver side door and running from the car.
As she ran, she looked back to see Hakimi standing behind her vehicle as it rolled and hit the side of the Belconnen Labor Club.
The woman, who was bleeding from her neck, tried to stop a taxi but it drove past her, court documents state.
Hakimi allegedly stood in the middle of the road and stopped the same taxi, which was occupied by two passengers.
He began striking the bonnet of the taxi with the knife, before opening the driver side door, and yelling:
"I have lost my kids, I will stab you, you black c---."
He allegedly struck at the taxi driver, and the knife cut his chin.
The driver grabbed his wrist and pulled him into the vehicle, while yelling:
"He stabbed me, he stabbed me."
Both passengers got out of the taxi and ran to help, pulling Hakimi from the car and restraining him on the ground.
A nearby security guard and another bystander ran to help, and Hakimi was held at the scene until police arrived.
Officers drew their Tasers and firearms as they approached the scene, but holstered them once they realised the bystanders had detained Hakimi.
He appeared in the ACT Magistrates Court before Magistrate Karen Fryar on Friday morning, and concerns were expressed for his mental health.
The court heard he had no memory of the incident, and had accepted he needed help.
Prosecutor Paul Sweeney opposed Hakimi's release on bail, arguing he was a clear risk to the community.
"But for the bravery of two Canberrans who were in the vicinity, there would have been deaths," he said.
Ms Fryar agreed that Hakimi was a significant risk to the public, and said he could receive treatment while behind bars.
"The facts of this matter are quite extraordinary and Mr Hakimi, I don't know what it is that precipitated this," she said.
"I don't know what it is, but what I do know is that these were very serious and unprovoked machete attacks on strangers."
Hakimi was remanded in custody and will appear again later this month.
Police are calling on anyone who witnessed the incident or have any information that could assist police to contact Crime Stoppers on 1800 333 000, or via act.crimestoppers.com.au and quote reference number 5881276.