More than 500 police backed up by helicopters were involved in raids across Sydney and Melbourne, arresting eight men in Sydney and nine in Melbourne and seizing chemicals, weapons, computers and backpacks.
One suspect was in critical condition after being shot in the neck during a gunfight with police, said police Commissioner Graeme Morgan. An officer was also slightly wounded.
One of the suspects wanted to die a martyr, a police officer said in court.
"I'm satisfied that we have disrupted what I would regard as the final stages of a large-scale terrorist attack ... here in Australia," New South Wales Police Commissioner Ken Moroney told Australian Broadcasting Corp. radio.
He later said he expected more arrests "in coming days and weeks."
Late Tuesday night, police raided another Sydney home as part of the terror probe, an Australian Federal Police spokesman said on condition of anonymity per government policy. There were no immediate arrests.
Prime Minister John Howard, who last week warned of a possible terror attack in Australia, thanked security forces in a nationally televised news conference.
"This country has never been immune from a possible terrorist attack," he said. "That remains the situation today and it will be the situation tomorrow."
Abu Bakr, an Algerian-Australian who has said he would be violating his faith if he warned his students not to join the jihad, or holy war, in Iraq, was among nine men who appeared Tuesday morning in Melbourne Magistrates Court charged with being members of a terror group.
Prosecutor Richard Maidment told the court the nine planned to kill "innocent men and women in Australia."
"The members of the Sydney group have been gathering chemicals of a kind that were used in the London Underground bombings," Maidment said. "Each of the members of the group are committed to the cause of violent jihad."
He said they underwent military-style training at a rural camp northeast of Melbourne.
Seven of the suspects, including Abu Bakr, were ordered detained until a court appearance on Jan. 31. Two others were to hear Wednesday whether their application to be released on bail was granted.
Detective Sergeant Chris Murray told the court police surveillance had picked up one suspect, 20-year-old Abdulla Merhi, pleading for permission to become a martyr during discussions with other suspects.
Murray said it was clear to police he wanted to die "similar to the nature of a suicide bomber."