Australia's main political leaders have clashed over the country's role in Iraq in the only televised debate ahead of next month's general election.
Australia still has about 850 troops serving in Iraq
Prime Minister John Howard insisted his decision to send troops had not made Australia more of a target for terror.
But opposition leader Mark Latham repeated his pledge to withdraw the 800 Australian troops from Iraq if he won.
Observers say terrorism has dominated the campaign since last week's bombing of the Australian embassy in Indonesia.
Nine people were killed and more than 180 were injured in Thursday's explosion in the capital, Jakarta.
The attack has prompted fears that militants could be trying to target the outcome of the general election in Australia on 9 October.
Both sides suspended campaigning in reaction to the bomb attack.
Spotlight on national security
This was a confident display by two men engaged in what is expected to be a very close race, the BBC's Phil Mercer reports from Sydney.
Mr Howard is seeking a fourth term, but he faces stiff competition from Labor Party leader Mr Latham, with the two parties level in opinion polls.
Some say Australia's support for the Iraq war may be behind the attack on its embassy in Indonesia
Mr Latham said the government's policy had made the country more vulnerable.
"I've no doubt that if all of the time, the effort, the money, the resources that went into Iraq had been used to break up al-Qaeda, the world today would be a safer place," Mr Latham said in the debate.
"Australia would be safer and more secure," he added.
But Mr Howard insisted that Australia was a target for terrorists long before it joined the campaign in the Middle East.
And he said Australia was still capable of fighting terrorism in the Asia-Pacific region.
"We can do both. We can finish the job there and do our full part in our part of the world," the prime minister said.
Mr Howard's Liberal/National coalition last won in November 2001, with a strong policy against illegal immigration.