SYDNEY (Reuters) - Police said on Tuesday they arrested three men who were allegedly preparing to attack a “mass gathering” in Melbourne, less than two weeks after a man was killed in Australia’s second-largest city in what police said was an act of terrorism.

Australian federal and state police, the Australian Security Intelligence Organisation, and other agencies that form part of the Joint Counter Terrorism Team carried out the arrests on Tuesday morning.

Police said three men, Hanifi Halis, 21, Samed Erikioglu, 26 and Ertunc Erikioglu, 30, were taken into custody after they allegedly sought to acquire a semi-automatic gun to carry out an attack.

All three men were charged with planning a terrorist act, police said. They are all Australian citizens and their passports were canceled earlier this year.

“We now have sufficient evidence to act in relation to preventing a terrorist attack,” Graham Ashton, Chief Commissioner of Victoria Police, told reporters.

Police said the suspects had yet to decide on the site of their planned attack but they believed it was imminent.

“They were certainly looking at a place of mass gathering, where there would be crowds,” Ashton said. “They were trying to focus on trying to have a place where they could kill as many people as possible.”

Slideshow ( 3 images )

Police said they believed the arrests had nullified any threat from the group.

Police said they are now combing through 17,000 intercepted phone calls and 10,500 messages exchanged between the group as part of evidence collected during their arrests. Police said it will take several months to transcribe the calls and messages.

Australia, a staunch U.S. ally that sent troops to Afghanistan and Iraq, has been on heightened alert since 2014 for attacks by home-grown militants returning from fighting in the Middle East or their supporters.

Australia currently sees the likelihood of a militant attack as “probable”, the midpoint on a five-level threat ranking system. It has been set at that level since the system was introduced in 2015.

Police said the three men were known to authorities and their passports were canceled because of concerns they would travel to a conflict zone overseas.

The arrests came less than two weeks after a man set fire to a pickup truck laden with gas cylinders in the center of Melbourne and stabbed three people, killing one, before he was shot by police.

Slideshow ( 3 images )

As was the case in that attack, police said on Tuesday the three men had been inspired by Islamic State rather than being directed by the militant group.

Police said the three suspects did not have any links to the man responsible for the Nov. 9 attack, although they had escalated their planning in the aftermath of that assault.

“Certainly over the last week they’ve become energized about doing something more quickly,” Ashton said.

Police said the suspects had been using encrypted messaging apps to communicate, which an Australian government minister said was further evidence of the need to amend the law.

Australia proposed a law earlier this year that would require companies such as Facebook and Apple to provide access to private encrypted data linked to suspected illegal activities.

“We have people now who are swapping messages using encrypted messaging apps. The police are blind to those messages,” Home Affairs Minister Peter Dutton told reporters in Sydney.