North Korea spurned harsh new U.N. sanctions Monday and threatened to defend itself with nuclear weapons if necessary, as Secretary of State Rex Tillerson repeated an offer to bargain with the outcast nation under the right circumstances.

There was no sign at a major Asian security conference here that the sanctions hailed by President Trump as a ­foreign policy achievement would succeed where past efforts have failed in trying to persuade the country to give up its nuclear weapons.

North Korean Foreign Minister Ri Yong Ho told diplomats that his country will never negotiate away what he called a rational “strategic option” against the threat of attack from the United States.

“We will, under no circumstances, put the nukes and ballistic rockets” up for negotiation, Ri said in prepared remarks, adding that the entire United States is within range of its missiles.

He dismissed the U.N. Security Council sanctions approved Saturday as illegal, appearing to rule out talks that the Trump administration, in a diplomatic partnership with China and Russia, is offering North Korea as a way out of its economic and diplomatic pariah status.