Malcolm Turnbull says Australia would enact the Anzus Treaty and "come to the aid of the United States" if North Korea attacked the superpower.
The Australian Prime Minister's declaration of support follows escalating threats between America and North Korea, who this week threatened to launch a multi-missile strike in the waters off the US Pacific territory of Guam.
"The United States has no stronger ally than Australia. We have an Anzus agreement and if there is an attack on Australia or the United States then each of us will come to the other's aid," Turnbull told 3AW radio.
"If there is an attack on the United States by North Korea then the Anzus treaty will be invoked and Australia will come to the aid of the United States, just as if there was an attack on Australia, the United States would come to our aid.
Former Australian PM John Howard invoked the treaty when the United States was attacked on 9/11, Turnbull recalled.
"Australia came to the aid of the United States. We stand together as we have done for generations."
The idea that any American president would tolerate a regime that could launch a nuclear warhead at an American city, was "absurd", Turnbull continued.
Trump had been speaking in language that North Korean leader Kim Jong-un "understood", after the US President warned North Korea would be "met with fire and fury like the world has never seen" if the regime launched missiles at Guam.
"Clearly diplomatic language has not been successful," Turnbull said.
Turnbull spoke with US Vice President Mike Pence overnight who said the conflict was "certainly the most dangerous flashpoint in the world today" but agreed the peaceful way of bringing North Korea "to its senses" was by increasing economic sanctions. He said China had particular influence.
"But of course if North Korea decides to carry out some of its violent threats then obviously terrible consequences will follow."
Former Australian prime ministers Tony Abbott and Kevin Rudd have urged Australia to consider a missile defence shield to protect against an attack, but Turnbull said the current advice was that such a system would not be beneficial.
"We are constantly reviewing our position," he said.
"The Thaad [Terminal High Altitude Area Defence] is designed to provide protection for relatively small areas against short- to intermediate-range missiles. It's not designed to provide protection against long-range intercontinental ballistic missiles of the sort North Korea has recently tested," he said.
Turnbull said the American alliance was the "absolute bedrock of our national security" and our nations were "joined at the hip".
The ANZUS Treaty obliges the US and Australia to go to each others' defence if attacked.
New Zealand was an original partner of the three-way Anzus Treaty when it was signed in 1951 as a security alliance.
But it was suspended in 1985 in the rift over the anti-nuclear laws and is no longer a formal ally.
The rift has been repaired, but not completely restored. New Zealand and the US have a defence co-operation agreement, the 2012 Washington Declaration, but there is no obligation to come to each other's aid.
NZ decision to be 'made on its merits'
Prime Minister Bill English said New Zealand would not necessarily follow Australia into any future military action with the US against North Korea - any such decision would be made on its merits and "in New Zealand's interests".
English said any military support for the US against North Korea was hypothetical and he was focused on a peaceful resolution to the nuclear threats between the two countries.
"While there's been an escalation of rhetoric there isn't any indication that military action is going to occur. We are in close contact with the US and Australia but any decision New Zealand makes about North Korea we make according to our own interests."
He again described US President Donald Trump's responses - such as tweeting North Korea would face "fire and fury" - as "not helpful".
English said any comments that escalated the tension were unnecessary but the US was still committed to resolving the issue without military action.
Foreign Minister Gerry Brownlee said any decision by New Zealand would depend on the nature of a conflict and was still hypothetical.
"From our perspective, if there were to be a conflict, firstly we'd have to know what the nature of that is and we'll know very quickly when that happens. If it was nuclear, for example, then I think you'd have to have a very serious look at what that meant and you can't really pre-empt that."
He believed Turnbull had simply been setting out Australia's position as an ally "and there's been a lot taken out of that that is fairly explosive."
"We think that's an interesting position for them to talk about, but not one we have stepped towards."
Australia was in a formal alliance with the US while New Zealand was "very very good friends" but not a formal ally.
He said New Zealand was still hopeful that talks and calm would prevail.
Everybody wanted Pyongyang to enter talks, including China, Russia and the US, which had put in place some reassurances for Pyongyang to help that happen. The sanctions were also starting to bite.
- Additional reporting by NZ Herald political staff.