Three men have been charged with terrorism offences over an allegedly “chilling” Isis-inspired Melbourne plot that police said aimed to kill as many people as possible using at least one semi-automatic rifle.

Hanifi Halis, 21, and brothers Samed Eriklioglu, 26, and Ertunc Eriklioglu, 30, faced Melbourne magistrates court on Tuesday afternoon following their arrests earlier in the day during a series of raids across northern Melbourne.

The trio appeared in Melbourne magistrates court on Tuesday afternoon, each charged with one count of acting in preparation for, or planning of terrorist acts.

The trio was arrested after a lengthy investigation and 17,000 phone intercepts, 10,500 text messages and more than 7,800 hours of recordings from listening devices would form part of the case, a prosecutor told court.

The men were each charged with one count of preparing or planning for a planning terrorist attack.

A brief of evidence was not expected to be ready for at least four months.

The accused terrorists were all remanded in custody until April, when they are due to face court again.

They have never been in custody before and Ertunc Eriklioglu sustained injuries during his arrest.

Australian federal police and Victoria police said the men had been arrested on Tuesday morning after allegedly being “involved in undertaking preparations for planning a terrorist act”.

The joint counter terrorism team, which includes Australian Security Intelligence Organisation officers, executed four warrants in Melbourne’s northern suburbs.

The AFP assistant commissioner, Ian McCartney, said if police had not acted “early in preventing this attack, we’ll allege the consequences would have been chilling”.

The Victoria police chief commissioner, Graham Ashton, alleged that the group had not identified a final location but said they had been eyeing off a “crowded place”.

“They were trying to have a place where they could kill as many people as possible,” Ashton said.

He alleged that police had seen the group become “much more energised over the past week” and determined that they had enough evidence to intervene.

Investigators had been monitoring the terrorist suspects since March, he said, and they had been in the process of acquiring of a .22 semi-automatic rifle.

Two of the three men were related, police said. They are Australians of Turkish descent and had cancelled their passports in January, March and October.

McCartney said police would allege the men were radicalised “within this cell as a group”. “We’re not suggesting this has been directed by Isis,” he said.

He said the three men had been communicating using encrypted apps.

Speaking hours before the funeral of the Melbourne cafe owner Sisto Malaspina, who was killed in a terrorist attack this month, authorities indicated there was no further threat to the public.

“We don’t believe there is any extended threat outside of the group we have custody,” said Ross Guenther, a Victoria police assistant commissioner.

The state premier, Daniel Andrews, said he was “grateful” to the 200 police officers involved in Tuesday’s operation. “The seriousness of this potential incident should not be underestimated,” he said.

The foiled attack prompted the home affairs minister, Peter Dutton, to repeat a demand that the federal parliament deal with the government’s encryption-cracking legislation before the end of the year.

Dutton called on parliament’s intelligence committee – which is currently assessing the package – “to return their advice back to parliament very quickly because this is legislation the government needs to deal with very quickly”. He said police were “blind” to encrypted messages being sent, and that was hampering investigations.

The parliamentary joint committee on intelligence and security is examining the telecommunications (assistance and access) bill, which contains powers to require tech companies to build new capabilities or provide technical assistance to law enforcement agencies’ surveillance activities, such as breaking encryption.

With Australian Associated Press