Australian police have arrested five Melbourne teenagers over an alleged terrorist plot to target police officers, authorities said.

They were inspired by the Muslim extremist Islamic State group and planned a major terrorism attack in Melbourne to mark the centenary next week of the Australian and New Zealand Army Corps (Anzac) landings at Gallipoli during the First World War, Australian police said on Saturday 18 April.

Victoria Police Deputy Commissioner Shane Patton said the 18-year-old men, from Hallam and Hampton Park, were "associates" of Abdul Numan Haider, 18, who was shot dead after stabbing two officers outside a Melbourne police station on 23 September 2014.

"It is alleged both men were undertaking preparations for a terrorist attack at an Anzac Day activity in Melbourne which included targeting police officers," Australian Federal Police Acting Deputy Commissioner Neil Gaughan said.

He later added that "some evidence that was collected at a couple of the scenes and some other information we have, leads us to believe that this particular matter was ISIS-inspired".

The five were nabbed early on 18 April in a raid by Victoria state police and the Australian Federal Police. Searches were still continuing in the south east of Australia's second-largest city, said a statement issued jointly by the two forces.

Two 18-year-olds have been arrested regarding alleged terrorism-related offences. A third 18-year-old has been arrested in relation to alleged weapons offences, while two other teens aged 18 and 19 are in custody and assisting police with their enquiries. All five are from suburbs in the city's far south east.

"It is alleged the men were undertaking preparations for planning a terrorist act in Australia, which included targeting police officers," the statement said.

Australia has recently sent hundreds of soldiers to Iraq to help train forces fighting the Islamic State. Australians have been recruited to both sides of the conflict, and some have been killed, despite a government ban on Australians fighting on either side.