Three men were charged on Tuesday with planning a mass-casualty attack in Australia's second-largest city, police said.
The Australian citizens were arrested in their Melbourne homes, Victoria Police Chief Commissioner Graham Ashton said.
All had had their passports cancelled this year because of security concerns.
Ashton said the trio communicated with encrypted messages, which made it difficult for police to determine when and where the attack was to take place.
"Whilst a specific location was not finalized, there was a view toward a crowded place," where they could kill more victims, Ashton told reporters.
Victoria Police Assistant Commissioner Ross Guenther alleged the men were trying to acquire 0.22 caliber semi-automatic rifles.
Semi-automatic rifles are virtually banned from public ownership under Australia's tough gun laws designed to reduce mass-casualty shootings.
Victoria Premier Daniel Andrews thanked state and federal police as well as security agencies for putting themselves at risk to keep the public safe.
"The seriousness of this potential incident should not be underestimated," Andrews said.
The men - 21, 26 and 30 - will appear in a Melbourne court later Tuesday, charged with acting in preparation of a terrorist event.
They each could face a life prison sentence if convicted.
"If we had not acted early in preventing this attack, we'll allege the consequences would have been chilling with potential ... significant loss of human life," McCartney said of the latest plot.