SEOUL (Reuters) - U.S. Defense Secretary Jim Mattis said on Saturday that he could not imagine United States ever accepting a nuclear North Korea, warning that its rapidly advancing nuclear and missile programs would undermine, not strengthen, its security.

Mattis has been at pains during his week-long trip to Asia to stress that diplomacy is America’s preferred course, a message he returned to after top-level military talks in Seoul on Saturday and at the tense border area with North Korea on Friday.

Still, he warned Pyongyang that its military was no match for the U.S.-South Korean alliance, and that diplomacy was most effective “when backed by credible military force.”

“Make no mistake - any attack on the United States, or our allies, will be defeated. And any use of nuclear weapons by the North will be met with a massive military response that is both effective and overwhelming,” Mattis said.

Mattis’s South Korean counterpart, Defense Minister Song Young-moo, dismissed the idea of deploying tactical nuclear weapons to the peninsula as a response to the North’s advances.

But the U.S.-Korean alliance had the ability to respond, even in the event of a nuclear attack from the North, Song added.

Tension between North Korea and the United States has been building after a series of nuclear and missile tests by Pyongyang and bellicose verbal exchanges between North Korean leader Kim Jong Un and President Donald Trump.

The CIA has said North Korea could be only months away from developing the ability to hit the United States with nuclear weapons, a scenario Trump has vowed to prevent.

Mattis, too, said Kim’s behavior had left no room to imagine accepting Pyongyang’s nuclear status.

U.S. Defense Secretary Jim Mattis and his South Korean counterpart Song Young-moo peer into North Korea from Observation Post Ouellette in the demilitarized zone separating North and South Korea October 27, 2017. REUTERS/Phil Stewart

“I cannot imagine a condition under which the United States can accept North Korea as a nuclear power,” Mattis told a news conference.

Trump - who has threatened to destroy the North if necessary - leaves on his first trip as president to Asia next week, including a stop in South Korea to meet President Moon Jae-in.

Moon, after talks with Mattis on Friday, said the “aggressive deployment” of U.S. strategic assets in the region, which have included overflights by U.S. bombers, had been effective in deterring the North Korean threat.

DENUCLEARIZE?

U.S. intelligence experts say Pyongyang believes it needs the nuclear weapons to ensure its survival and have been skeptical about diplomatic efforts, focusing on sanctions, to get Pyongyang to denuclearize.

Mattis suggested, however, that Pyongyang needed to understand that its weapons programs would not strengthen its defenses. The North says it wants a nuclear-tipped missile capable of reaching the United States.

“If it remains on its current path of ballistic missiles and atomic bombs, it will be counter-productive,” Mattis said, adding North Korea would be “reducing its security.”

Still, any attempt to force the North to denuclearize could have devastating consequences, thanks in part to the large amount of artillery trained on Seoul.

During Mattis’ trip to the inter-Korean Demilitarized Zone (DMZ) on Friday, he was briefed on the posture of North Korean artillery.

Defense Minister Song suggested that U.S. and South Korean missile defenses simply could not stop all of the weapons trained on the South.

“Defending against this many LRAs (long-range artillery) is infeasible in my opinion,” Song told Mattis at the DMZ, citing a need for strategies to “offensively neutralize” the artillery in the event of a conflict.

Mattis replied: “Understood.”

Still, Mattis reaffirmed to reporters in South Korea that military options do exist to deal with the North Korean threat that spare the South’s capital, Seoul. Mattis, who has made such assurances in the past, did not disclose what those options were.