Militants connected with the radical group calling itself the Islamic State (IS) were planning to behead a member of the public in Australia, Prime Minister Tony Abbott has said.
His comments came after hundreds of police raided homes in a sweeping counter-terrorism operation.
Mr Abbott said there was a "serious risk from a terrorist attack" days after Australia raised its national terror threat level to "high" for the first time, citing the likelihood of attacks by Australians radicalised in Iraq or Syria.
Australia is concerned over the number of its citizens believed to be fighting overseas with militant groups.
More than 800 police were involved in the pre-dawn security operation in Sydney and Brisbane, which was described as the largest in Australian history.
It resulted in the detention of 15 people, police said.
Mr Abbott told a news conference that members of the radical group had planned to conduct a public beheading.
"That's the intelligence we received," he said.
Media reported that the plans included snatching a person at random in Sydney, Australia's largest city, and executing them on camera draped in the group's black flag.
"The exhortations, quite direct exhortations, were coming from an Australian who is apparently quite senior in ISIL (now known as the Islamic State) to networks of support back in Australia to conduct demonstration killings here in this country," Mr Abbott said.
IS has seized large swaths of territory in Syria and Iraq.
Sydney man Omarjan Azari, 22, appeared in court after the raids.
He has been charged with conspiracy to commit a terrorist act and will remain in custody until a hearing in November, authorities said.
Prosecutor Michael Allnutt told the court in Sydney that an attack was being planned that "was clearly designed to shock and horrify, perhaps terrify" the community, the Sydney Morning Herald reported.
Mr Azari's lawyer, Steven Boland, did not apply for bail.
Mr Boland told the court the allegation was based on one phone call, according to media reports.
Up to 160 Australians have either been involved in fighting in the Middle East or actively supporting it, officials have said.
At least 20 are believed to have returned to Australia and pose a security risk, the head of the national spy agency said last week.
Highlighting the risk of homegrown militants returning from the Middle East, Mr Abbott pledged on Sunday to send a 600-strong force as well as strike aircraft to join a US-led coalition fighting Islamic State militants in Iraq.