The United States will never accept a nuclear-armed North Korea and any nuclear attack by Pyongyang will meet a massive military response, the US defence chief warned.

James Mattis made the comments in Seoul, South Korea, on Saturday at a joint press conference with his counterpart Song Young-moo, a day after visiting the demilitarised zone that has divided the two Koreas since the 1950-53 war on the peninsula.

"Make no mistake - any attack on the United States or our allies will be defeated," Mattis said. "Any use of nuclear weapons will be met with a massive military response.

"I can't imagine a condition under which the United States will accept North Korea as a nuclear power… Our combined effort is to deter that sort of threat or to have military options - many different military options - that would realistically reduce that threat as low as possible. And yes, we do have those options," the defence secretary said.

The North's official Rodong Sinmun newspaper accused the US and South Korea on Saturday of "crazily beating the drum of confrontation".

Using the acronym for the country's official name, Democratic People's Republic of Korea, it added "no force can ever check the strenuous advance of the DPRK … demonstrating its dignity as a nuclear power."

In a commentary on Friday, the official Korean Central News Agency warned the US, South Korea, and Japan against "militarist ambition".

{articleGUID}

The US "eggs its junior allies on to come out as cannon fodder", it said, adding the three countries "must clearly understand that retaliation of justice will ensue the reckless military action".

Tensions on the divided peninsula have heightened in recent months after a flurry of intercontinental ballistic missile (ICBM) tests and the North's sixth and most powerful nuclear detonation last month.

The US fears Pyongyang's nuclear capabilities will soon reach the point where it can fire a nuclear-tipped ICBM that is able to hit the US mainland.

President Donald Trump has warned the US will "totally destroy" the communist country if it attacks the US or its allies in the Asia-Pacific region.

For its part, North Korea has condemned repeated US-South Korean military exercises off the peninsula, which it says are a prelude to a military strike aimed at decapitating regime of leader Kim Jong-un.

Al Jazeera's Tony Birtley, reporting from Seoul, said despite Mattis' strong language on Saturday, the Pentagon chief did stress diplomacy was the preferred way forward.

"He is working in a highly tense situation now. The ante has been upped considerably in the last few weeks," said Birtley.

"With President Trump visiting on November 7-8, some people believe that will be a catalyst from some kind of response. The foreign minister of North Korea has intimated there could be an atmospheric nuclear test - maybe that could happen during President Trump's visit."