Police in Australia have said they foiled a suicide bomb plot after arresting four men who were allegedly planning commando-style attacks on at least one army base.

Prime minister Kevin Rudd said the plot was a "sober reminder" that terrorists were still a threat to Australia, which earned the hatred of extremist groups for sending troops to join the US-led campaigns in Afghanistan and Iraq.

Around 400 officers from state and national security services took part in 19 pre-dawn raids yesterday on properties in Melbourne, Australia's second largest city, and arrested four men believed to be linked to Somali extremists.

The raids followed a seven-month surveillance operation against the group, said to be linked to al-Shabaab, a Somali Islamic extremist group, Australian Federal Police acting commissioner Tony Negus said.

Members of the cell planned to enter an army base armed with automatic weapons and open fire, Mr Negus said.

"The men's intention was to actually go into the army barracks and to kill as many soldiers as they could before they themselves were killed," he said.

"This operation has disrupted an alleged terrorist attack that could have claimed many lives."

The suspects will appear in court later.They are Australian citizens aged from 22 to 26, Victoria state police said. Several others were being questioned.