President Donald Trump's withdrawal from the Iran nuclear deal is a major setback to US negotiating credibility and will complicate efforts to reach an agreement with Pyongyang over its own more advanced weapons programme, analysts say.
Trump is set to hold a much-anticipated and unprecedented summit with North Korean leader Kim Jong Un in the coming weeks to negotiate over Pyongyang's arsenal, after it last year carried out by far its most powerful nuclear test to date and launched missiles capable of reaching the US mainland.
But the US president Tuesday pulled Washington out of the 2015 accord with Teheran, pouring scorn on the "disastrous" agreement and describing it an "embarrassment" to the United States -- although European signatories and the IAEA say Iran has complied with its obligations.
Antony Blinken, who was deputy secretary of state under Barack Obama, said the White House move "makes getting to yes with North Korea that much more challenging".
"Why would Kim ... believe any commitments President Trump makes when he arbitrarily tears up an agreement with which the other party is complying?" he asked on Twitter.
MIT political science professor Vipin Narang added: "Today is a stark reminder across the world: Deals are reversible and can have expiration dates, while nuclear weapons can offer lifetime insurance."
North Korea remains technically at war after the 1950-53 Korean War ended with a ceasefire rather than an armistice, and Pyongyang has long insisted that it needs nuclear weapons to defend itself from a possible US invasion.
Two weeks ago Trump's new national security advisor John Bolton said "We have very much in mind the Libya model," for the denuclearisation of North Korea.
Libyan leader Moamer Kadhafi agreed to abandon his pursuit of nuclear weapons in the early 2000s, but his government was later overthrown by rebel forces supported by Western air strikes, and he was killed.
Pyongyang regularly cites the fates of Kadhafi and Saddam Hussein in Iraq -- whose government was overthrown in a US-led invasion -- as evidence of the need for nuclear arms.
Former CIA director John Brennan said Trump's "madness" had "undermined global confidence in US commitments, alienated our closest allies, strengthened Iranian hawks, & gave North Korea more reason to keep its nukes".
Some were more sanguine.
Pyongyang was concerned about the sustainability of a deal and sees democratic changes of government as a "structural weakness that imperils agreements by any one White House", said Yonsei University professor John Delury.
But he added: "They'd be worried less about Trump pulling out of a deal than his successor."
- Security guarantee -
The unilateral nature of Trump's move is also likely to worry officials at the Blue House in Seoul.
The decision was made despite repeated personal pleas by European leaders and cast aside more than a decade and a half of careful diplomacy by Britain, China, France, Germany, Iran, Russia and past US administrations.
South Korean President Moon Jae-in has been widely praised for seizing the opportunity presented by the Winter Olympics to broker talks between Trump and Kim - two leaders who were at loggerheads just months before, and threatening to wage a war which would inevitably devastate the South.
But the fate of the Iran deal suggests Trump could also dismiss pleas from Seoul -- a treaty ally -- in future.
Analysts pointed to Kim's repeated trips to China as evidence Pyongyang was looking for support from its longstanding diplomatic protector and provider of trade and aid.
Kim met President Xi Jinping this week for the second time in little more than a month, after not paying his respects to him for six years after taking power as their relationship frayed.
"North Korea has been fully aware of the risks of the US walking away from any deal whenever its government changes hands," said Koh Yu-hwan of Dongguk University told AFP.
"In order to hedge against this eventuality, Kim Jong Un met Xi Jinping twice to obtain a firmer security guarantee from China before he enters a deal with the US."
And Pyongyang wanted wider assurances, he added.
According to China's official Xinhua news agency, Kim told Xi that "relevant parties" should "abolish their hostile policies and remove security threats against the DPRK".
"This means the North is seeking a global commitment to a deal with the US to prevent the US from unilaterally rolling it back," Koh told AFP.
Donald Trump is set to hold a much-anticipated and unprecedented summit with North Korean leader Kim Jong Un�in the coming weeks
Pyongyang regularly cites the fates of Libyan dictator Moamer Kadhafi and�Saddam Hussein in Iraq as evidence of the need for nuclear arms
Kim Jong Un met President Xi Jinping this week for the second time in just over a month