Secretary of Defense James Mattis answering questions from the press during a flight to South Korea on Wednesday. Sgt. Amber I. Smith/US Army Defense Secretary Jim Mattis threatened an "effective and overwhelming" response by the US and its allies if North Korea were to use nuclear weapons.

His remarks came on his first overseas trip as defense secretary, to South Korea, where he met with his counterpart in the Republic of Korea's Ministry of Defense and other government officials.

"North Korea continues to launch missiles, develop its nuclear weapons program, and engage in threatening rhetoric and behavior," Mattis said. "Any attack on the United States, or our allies, will be defeated, and any use of nuclear weapons would be met with a response that would be effective and overwhelming."

He also praised South Korea — where nearly 30,000 US troops are stationed — as a "lynchpin of peace and stability" in the Asia-Pacific region.

Mattis' stern warning to the North is likely to be taken seriously, since Pyongyang often responds to the slightest provocation. North Korea regularly threatens total war against its southern neighbor, for example, whenever American and South Korean forces train together during annual exercises, which are regularly scheduled and known well ahead of time.

The secretary's overseas trip was also another chance to push the South to continue with its deployment of the US's powerful Thaad missile-defense system, which would blanket the country with protection from conventional or nuclear-tipped missiles fired from the north.