Anthony Albanese has backed America's "unilateral action" to strike Iranian nuclear facilities after a day of silence on the superpower's decision to enter the Middle East conflict.
But in his first public comments since the US launched strikes on the facilities in Fordow, Isfahan and Natanz, the prime minister also said a wider war must be avoided.
"The world has long agreed that Iran cannot be allowed to get a nuclear weapon and we support action to prevent that," he said on Monday.
"We don't want escalation and a full-scale war. We continue to call for dialogue and for diplomacy.
"Iran didn't come to the table, just as it has repeatedly failed to comply with its international obligations."
Some US allies in Europe have been more muted than Australia in their reaction to the strikes, while UN chief Antonio Guterres labelled them a dangerous escalation.
Mr Albanese earlier convened a National Security Committee meeting.
Asked if Australia was briefed on the US strikes beforehand, or if the nation had any involvement, the prime minister replied: "This was unilateral action taken by the United States."
Mr Albanese would not say if the Pine Gap joint Australian-US intelligence surveillance base, located outside Alice Springs, was used in the operation.
He also defended his decision to hold off commenting on the US strikes for at least 24 hours, saying Australia wasn't a "central player in this conflict".
A government statement on Sunday noted Iran's nuclear and missile programs had been a threat to international security, while also calling for "de-escalation, dialogue and diplomacy".
Australian National University expert associate Jennifer Parker said it wasn't surprising Canberra might not have been briefed on the attack as it no longer had major forces in the Middle East.
"The Australian government was always going to have to come out in full support of the US, otherwise it would fundamentally undermine our relationship," she said.
"You cannot defend the actions that Iran has been taking as a destabilising force in the region for a long time."
Australia's support for the US acknowledged what happened in the Middle East also sent "key signals" to the Indo-Pacific, Ms Parker said.
"The US telling Iran that they need to negotiate ... and then action being taken does reinforce, to a certain degree, deterrence in the Indo-Pacific," she said.
She was unclear where the actions sat when it came to international law.
Pressed on the issue of legality, Mr Albanese dodged questions.
Acting opposition foreign spokesman Andrew Hastie said the coalition had wanted to see Iran come to the negotiating table and submit to a full inspection by the International Atomic Energy Agency.
Foreign Minister Penny Wong said the number of Australians who had registered for help to leave the region had jumped to about 2900 in Iran and 1300 in Israel.
Department of Foreign Affairs staff were evacuated from the embassy in Tehran days earlier and were now helping Australian citizens and residents who made it through Iran's border with Azerbaijan.
"That was a difficult decision to make," Senator Wong said.
"The advice to me, which I discussed with the prime minister and the deputy prime minister, was to ensure we got our people out."
Iran's parliament voted to close the Strait of Hormuz, the transit route for about a quarter of the world's oil, prompting fears prices could push to $US100 a barrel or more.
Despite fears about rising oil prices, NRMA spokesman Peter Khoury said Australian motorists should not be concerned.
"To get back to those record high prices that we saw back in 2022, you would need a catastrophe at that level to affect global supply. We're not there yet," he said.
Australia previously provided resources to safeguard shipping lanes, but military involvement has been ruled out following the recent conflict.