Police have carried out anti-terrorism raids in Sydney sparked by intelligence reports that Islamist extremists were planning random killings in Australia.
PM Tony Abbott said a senior Australian Islamic State militant had called for "demonstration killings", reportedly including a public beheading.
The raids, with at least 800 heavily armed officers, led to 15 arrests.
One man has been charged with planning an attack. Prosecutors said it involved "gruesomely" killing someone.
Omarjan Azari, 22, is accused of conspiring with Mohammad Ali Baryalei - believed to be the most senior Australian member of IS - and several others between May and September, according to court documents.
Australian media reports said they had discussed abducting members of the public and beheading them on camera, draped in a black IS flag.
In recent weeks, IS has released video footage showing the beheadings of two American journalists and a British aid worker seized in Syria.
Analysis: BBC's Jon Donnison in Sydney
The news of an alleged plot to publicly behead a random Australian will shock many people here, including the vast majority of this country's long-established moderate Muslim community.
Many Muslims are unhappy with what's going on in Iraq and Syria but would never resort to violence. These raids risk antagonising the broader Islamic community.
But Australia, like many countries including Britain, is worried about the threat from Islamic State, not just abroad but at home. More than a decade on from Australia's support for the US-led war in Iraq, the country finds itself embroiled in a conflict that is far from over.
Tony Abbott this week announced he is sending 600 troops to the Middle East to assist in the fight against Islamic State. Security forces clearly face a battle at home too.
Who are Australia's radicalised Muslims?
Asked about the reports at a news conference, Mr Abbott said: "That's the intelligence we received.''
"Direct exhortations were coming from an Australian who is apparently quite senior in [IS] to networks of support back in Australia to conduct demonstration killings here in this country."
Prosecutor Michael Allnutt said Mr Azari had planned to commit "extremely serious" offences that involved "an usual level of fanaticism" and were "clearly designed to shock, horrify and terrify" the public.
The plot involved the "random selection of persons to rather gruesomely execute", and those involved had an "irrational determination" to carry it out even though they knew they were under surveillance, he added.
The charge against Mr Azari stemmed from a telephone call intercepted earlier this week, which prompted police to carry out the raids.
"It's been an immediate reaction to a clear, imperative danger," Mr Allnutt said.
Mr Azari's barrister told the court that police had very little evidence to support the charge, but he did not apply for bail.
Another of those arrested, a 24-year-old man, was charged with unauthorised possession of a prohibited weapon and possessing ammunition without a licence.
About 200 people from Sydney's Muslim community held a protest against the raids on Thursday night. Speakers reportedly made claims of police brutality and political hysteria.
The anti-terrorism operation - the largest in Australian history - began early on Thursday, with officers executing 25 search warrants across 12 suburbs of Sydney.
Other raids took place in Brisbane. Acting Australian Federal Police Commissioner Andrew Colvin said they were not directly linked to the Sydney operation but related to a raid last week on an Islamic centre that led to two men being charged with terrorism offences.
Australia and foreign fighters:
- 21 Jul: Officials say Australian suicide bomber behind Iraq blast
- 5 Aug: New legislation aimed at preventing people going to fight in the Middle East announced
- 11 Aug: Image emerges of son of Australian fighter holding severed head of Syrian soldier
- 27 Aug: New counter-terrorism units set up in airports to stop departing fighters
- 10 Sept: Brisbane Islamic centre raided; two charged with terrorism offences
- 12 Sept: Australia raises terror threat level
- 14 Sept: PM Abbott commits 600 troops to fight against IS
Phil Mercer: Australia's home-grown terror threat
Mr Colvin said the age of Mr Azari and others under investigation were of concern, adding: "We are seeing that younger and younger men are deciding to take up arms or wanting to participate or in some way contribute to the cause."
Last week, the Australian Broadcasting Corporation reported that Mr Baryalei, a former Sydney bouncer and part-time actor, had recruited a "who's who" of Australian IS fighters.
The Australian police subsequently confirmed that a warrant had been issued for him for "alleged terrorism-related activities".
Officials say dozens of Australians have gone to fight for IS, which has taken control of large swathes of Iraq and Syria, and the al-Nusra Front, an al-Qaeda-affiliated rebel group in Syria.
Australia has recently committed troops to combat IS in Iraq.
Reproduced under licence from BBC News © 2014 BBC