Two teenage boys have been charged with preparing a terrorist act and being members of a terrorist organisation.
The 16-year-olds were arrested carrying two bayonet-type knives by the Joint Counter Terrorism Team near a Bankstown prayer hall in western Sydney on Wednesday.
Each was charged on Thursday with planning a terrorist act, which carries a penalty of life in prison, and being a member of a terrorist organisation, which carries a penalty of 10 years' imprisonment, NSW police said.
Police had believed an attack was imminent, NSW Police Force Acting Commissioner Catherine Burn told reporters in Sydney on Thursday.
"We will be alleging that the two 16-year-old boys went to a gun shop in Bankstown and purchased two knives," she said.
"They have then gone from that location, caught a bus to the location in Bankstown where they were arrested and those items were seized."
"We believe the attack was inspired by Islamic State," Ms Burn added.
She declined to confirm reports one was related to a man already in jail convicted of terror offences.
"We were well aware of these two 16-year-olds. We have been concerned about them," she said.
Police laid charges at 5am after hold the boys overnight.
The pair are due to appear in Parramatta Children's Court later on Thursday.
This is the eleventh imminent attack prevented by the Joint Counter Terrorism in Australia, authorities say.
Police praised the Joint Counter-Terrorism team for their actions on Wednesday.
"Had we not been in the right place at the right time... certainly somebody, potentially today, would be, or another day, would be without their life," AFP Deputy Commissioner Michael Phelan told reporters.
Police believe the pair had been radicalised.
"I think they had potential radicalisation from potentially radicalised peers," Ms Burn said.
"We know that they have connections with people who are radicalised and who are of concern to us."
Ms Burn would not comment on reports of a note being found on one of the boys, as the matter is now before the courts.
"We do have evidence. That will come out in court," she said.
