North Korea "should cease any consideration of actions that would lead to the end of its regime and the destruction of its people", Mattis said in an August 9 statement.
The Pentagon has prepared a plan involving a B-1B heavy bomber attack against the Democratic Peoples Republic of Korea which is ready should President Trump, as Commander in Chief of the U.S. Armed Forces, decide to order an attack, NBC News reported.
The tweet came amid a sharp escalation in tensions between the US and the rogue state, with Pyongyang having earlier threatened to launch missiles at the Pacific island of Guam, where there is a USA military base.
His visit came the day after President Trump said North Korea would be met with "fire and fury" in the event of a nuclear attack.
US Defense Secretary James Mattis has said war with North Korea would be "catastrophic" as tensions with the reclusive nation reach breaking point.
The United States and South Korea remain technically still at war with North Korea after the 1950-53 Korean conflict ended with a truce, not a peace treaty.
That impetus has only grown among administration officials amid reports this week that Pyongyang had built a nuclear warhead small enough to fit atop one of the country's long-range missiles.
Mattis said North Korean leader Kim Jong Un should "take heed" of the U.N. Security Council's statement that Pyongyang poses a global security threat.
China has urged the United States and North Korea on Friday to be "cautious" with their words and actions after the two sides stepped up their bellicose rhetoric over Pyongyang's weapons programme.
'The current situation on the Korean Peninsula is highly complicated and sensitive.
Pyongyang on Thursday announced it was finalising a plan to fire four missiles near the United States territory of Guam.
Mattis said that though the State Department is making efforts to resolve the threat using diplomatic means, allied militaries possess "robust defensive and offensive capabilities".