U.S. Defense Secretary Jim Mattis emphasized diplomatic efforts to resolve the North Korean missile and nuclear crisis as he stood at the tense and heavily fortified border between the North and South on Friday, saying, "Our goal is not war."

His remarks came before President Trump — who has threatened to destroy North ­Korea if necessary — leaves on his first trip to Asia next week, including a stop in South Korea to meet with President Moon Jae-in.

For his part, Moon, after talks with Mattis, said the "aggressive deployment" of U.S. strategic assets in the region, which have included overflights by U.S. bombers, have been effective in deterring the North Korean threat.

Tension between North Korea and the United States has been building after several nuclear and missile tests by Pyongyang and bellicose verbal exchanges between Trump and North Korean leader Kim Jong Un, stoking fears that any miscalculation could lead to an armed confrontation.

"North Korean provocations continue to threaten regional and global security despite unanimous condemnation by the United Nations Security Council," Mattis said in prepared remarks as he visited the demilitarized zone.

"As Secretary of State [Rex] Tillerson has made clear, our goal is not war but rather the complete, verifiable and irreversible denuclearization of the Korean Peninsula," he said.

Standing alongside Mattis, South Korean Defense Minister Song Young-moo said: "We together will continue to defend peace through strong will and strong might."

Ahead of Trump's visit to Asia, Mattis has emphasized diplomatic efforts to find a peaceful solution to the crisis during his week-long trip to the region.

"That's really what it was all about — to keep the [North Korea] effort firmly in the diplomatic lane for resolution," Mattis said this week after three days of meetings with Asian defense chiefs in the Philippines.

The United States flew Air Force bombers over waters east of North Korea last month in a show of force. The U.S. Navy, in what it says was a long-planned maneuver, will have three U.S. aircraft carrier strike groups in the Pacific in the coming days.