POLICE say they have prevented an “imminent attack” linked with Islamic State after arresting two Sydney men in anti-terror raids.

Two men aged 24 and 25 are in police custody after being arrested over an alleged terror plot in raids carried out by NSW Police and Australian Federal Police at a house in the western Sydney suburb of Fairfield just after 4pm Tuesday.

NSW Police deputy commission Catherine Burn said police will allege the men had intended to carry out a potentially fatal attack yesterday.

Police today confirmed a machete, a hunting knife, a homemade flag representing Islamic State and a video “which depicted a man talking about carrying out an attack”, were seized in yesterday’s raids of the Riverview Road home.

Deputy commissioner Burn said the men were “well advanced in their preparations” for the attack “consistent with IS messages”.

“We believe that the men were potentially going to harm somebody, maybe even kill somebody, potentially using one of the items that we recovered yesterday, potentially a knife,” she said.

Police said evidence seized indicated the potential attack was “imminent yesterday”.

“One of the items that will be introduced into evidence is a video, and in that video, we will allege that one of the men indicated that an attack was going to be carried out,” Deputy Commissioner Burn said.

The deputy commissioner indicated the plan of the terror-accused was not particularly sophisticated.

“They are not necessarily using sophisticated methods to carry out what they intend to do,” she said.

The two men are due to appear in Fairfield local court today charged with planning a terrorist act.

The pair were not known to police, and police say they were only made aware of the planned activity recently.

AFP deputy commissioner Michael Phelan said the threat was acted on as quickly as possible.

“This is a new paradigm for all of us,” he said.

“These matters come upon us very quickly.

“The attack was imminent yesterday. We acted as early as we possibly could.”

The arrest follows police suspicion over a beheading plot in Martin Place uncovered after separate raids last year.