Two men were charged on Wednesday with planning to launch an imminent terrorist attack in Australia, after police seized a homemade flag associated with the Islamic State group, a machete and a hunting knife in a counterterrorism raid.

The men, aged 24 and 25, would have carried out the attack on Tuesday if they had not been arrested that day in the raid in the Sydney suburb of Fairfield, New South Wales state Deputy Police Commissioner Catherine Burn told reporters.

A video that was seized during the raid showed one of the men making threats, though Burn declined to detail exactly what was said. Australian Attorney General George Brandis later told the Senate that the video depicted one of the suspects kneeling in front of the Islamic State flag with the knife and machete while making a politically motivated statement and threatening to commit "violent acts" with those weapons.

Story continues below advertisement

The men planned to launch their attack in western Sydney, he said.

Asked whether they were planning a beheading, Burn replied, "We don't really know what act they were going to commit."

"What we are going to allege is consistent with the IS messaging," she said, using an abbreviation for the Islamic State group. "We believe that the men were potentially going to harm somebody, maybe even kill somebody, and potentially using one of the items that we identified and recovered yesterday, potentially a knife."

Police were trying to determine whether the men were in contact with anyone from the Islamic State movement.

"Yesterday, our focus was to act on information that we received about something that was imminent," Burn said. "We believe that we have stopped that threat from occurring. However, there are further investigations that now we will need to follow through."

Omar Al-Kutobi and Mohammad Kiad were charged with undertaking acts in preparation or planning for a terrorist act, which carries a maximum punishment of life in prison. Their lawyer didn't apply for bail and it was formally refused during a brief court hearing Wednesday. Neither man appeared in the courtroom.

Police don't believe there is any link between the alleged plot and another plot that prompted a series of counterterror raids in Sydney in September. One man arrested during those raids was charged with conspiring with an Islamic State leader in Syria to behead a random person in Sydney.

Story continues below advertisement

Australia's government raised the country's terror warning level in September in response to the domestic threat posed by supporters of the Islamic State group, which has threatened Australia in the past. In September, its spokesman Abu Mohammed al-Adnani issued a message urging attacks abroad, and specifically mentioned Australia.

In December, Man Haron Monis, an Iranian-born, self-styled cleric with a long criminal history, took 18 people hostage inside a downtown Sydney cafe. Among his demands was that he be delivered an Islamic State flag. Investigators, however, have said it doesn't appear Monis had established any contact with the Islamic State group.

Prime Minister Tony Abbott said he suspected the terror threat in Australia was going to only worsen.

"As we have seen again and again in recent times, the death cult is reaching out all around the world, including here in Australia," Abbott told Parliament. "There are people in this country who are susceptible to these indictments to extremism and even terrorism."

The government believes about 90 Australians are fighting alongside the Islamic State movement in Syria and Iraq, with another 140 supporting the group from Australia.

The proliferation of Islamic State-style attack plots in countries such as Australia is not surprising because such plots are generally simple and low tech — which makes them harder to stop, said Clive Williams, a counterterrorism expert at the Australian National University and a former military intelligence officer.

Story continues below advertisement

"To drive a car into a group of policemen takes no planning whatsoever," Williams said. "It's a lot different from what al-Qaida was encouraging people to do, which was to do sophisticated bombings which would result in lots of casualties but took lots of preparation and organization. There was a better chance of detecting them, but they were more dangerous — whereas these are less detectable but less dangerous."