Australian troops and diplomats in Iraq have been confirmed safe after Iran attacked coalition forces in the country.
"But it is obviously a very fluid situation," Scott Morrison told reporters on Wednesday.
"We're doing everything to ensure their continued safety."
The prime minister said he told Defence chief Angus Campbell to do whatever it takes to keep Australians safe.
"I gave authority this morning to do what was necessary and to take what actions and decisions were necessary to protect ADF personnel and diplomatic staff," Mr Morrison said.
Iran launched more than a dozen missiles on two US-led military bases, in Erbil in northern Iraq and Al-Assad in the west, in response to the killing of Tehran's most senior military leader Qasem Soleimani.
A US official said there were very few, if any, casualties, while Iran said it is not seeking escalation or war.
Australia has troops close to the Al-Assad base and around 300 more at Taji in northern Iraq, along with about 50 New Zealanders.
Warning sirens sounded at the Taji base but it did not come under attack.
Australian diplomatic staff are housed at an embassy in Baghdad.
Mr Morrison has not ruled out withdrawing Australians from Iraq.
"We will continue to assess the situation," he said.
"At this stage, it is a matter of protecting and defending those Australians where they are and working closely with our partners in the region."
The national security committee of cabinet has been meeting since Saturday to review the situation in Iraq and will meet again on Thursday.
The prime minister has briefed Opposition Leader Anthony Albanese on the unfolding situation.
Mr Albanese has urged America and Iran to exercise restraint.
"I don't want to see Australia drawn into a military conflict in the Middle East," he told reporters.
The prime minister has spoken to US Secretary of State Mike Pompeo about the rocket attacks, while Australia's defence and foreign ministers have contacted their American counterparts.
The Pentagon says it has taken "all appropriate measures" to safeguard its personnel and partners.
"These bases have been on high alert due to indications that the Iranian regime planned to attack our forces and interests in the region," a US Department of Defense spokesman said.
"As we evaluate the situation and our response, we will take all necessary measures to protect and defend US personnel, partners and allies in the region."
Mr Morrison learnt about the attack while flying from Canberra to South Australia to visit bushfire-ravaged Kangaroo Island.
NRMA spokesman Peter Khoury is concerned about the potential impact on petrol prices.
"The next 24 hours will be critical," Mr Khoury told AAP.
"The US markets are worrying - prices jumped almost immediately by four per cent - if that's an indication of what's to come, it's very concerning."
© AAP 2020