The United States would "take out" any North Korea missile seen as on course to hit Guam, a U.S. territory in the western Pacific, Defense Secretary Jim Mattis said Monday.

Referring to North Korea's threat last week to simultaneously fire four ballistic missiles into waters off Guam, Mattis said Washington would know the trajectory of a missile fired by Pyongyang "within moments," and that if the missile is expected to hit Guam, "we'll take it out."

The Pentagon chief warned that war could break out if North Korea were to fire a missile at the United States.

"If they fire at the United States, it could escalate into war very quickly," he told reporters. "Yes, that's called war, if they shoot at us."

If a missile were headed to waters near Guam, rather than directly targeting the island, President Donald Trump would decide what action the United States will take, Mattis said.

Earlier, Mattis and U.S. Secretary of State Rex Tillerson jointly warned that any attack by North Korea "will be defeated," and that any use of nuclear weapons "will be met with an effective and overwhelming response."

"While diplomacy is our preferred means of changing North Korea's course of action, it is backed by military options," the two officials wrote in an op-ed piece carried in the Monday edition of the Wall Street Journal.

On Friday, Trump said the U.S. military is "locked and loaded" should North Korea act unwisely after threatening to land missiles in waters near Guam.

Tensions between Washington and Pyongyang have risen sharply since North Korea test-launched two intercontinental ballistic missiles in July.

Mattis and Tillerson said Washington has no interest in regime change in Pyongyang or accelerated reunification of the Korean Peninsula, and that the Trump administration is willing to talk with North Korea if it signals its desire to negotiate "in good faith."

"A sincere indication would be the immediate cessation of its provocative threats, nuclear tests, missile launches and other weapons tests," they said in the op-ed piece.

The secretaries urged all nations to honor their commitments to enforce U.N. Security Council sanctions against North Korea including the latest package that could cut its $3 billion annual export revenue by a third.

"The U.S. will continue to request Chinese and Russian commitments not to provide the regime with economic lifelines and to persuade it to abandon its dangerous path," they said, referring to the two countries critics say are economic enablers of North Korea's nuclear weapons and ballistic missile programs.

The new sanctions resolution, adopted by the U.N. Security Council earlier this month, bans North Korean exports of coal, iron, iron ore, lead, lead ore and seafood.

It also bans countries from increasing the current numbers of North Korean laborers working abroad, prohibits new joint ventures with North Korea and any new investment in current joint ventures.