WASHINGTON — The Trump administration says scrapping a nuclear agreement with Iran strengthens its hand in negotiations with North Korea, signaling that President Donald Trump will only accept a “real deal” that eliminates Pyongyang’s nuclear arsenal.

But Trump’s exit from the Iran deal may make reaching its goal with North Korea more difficult, leaving U.S. credibility in doubt as it embarks on an even tougher negotiation.

Unlike with Iran, which halted its nuclear program before testing a weapon, Trump is asking North Korean leader Kim Jong Un to give up hundreds of weapons and missiles that already exist, while demanding intrusive inspections in a closed country with a long history of cheating on international agreements.

“Pyongyang likely sees the decision as proof the United States cannot be trusted — that any deal reached with one president can be discarded by the next,” said Ivo Daalder, president of Chicago Council on Global Affairs. “That will make reaching any agreement with North Korea that much more difficult.”

Trump, speaking to reporters Wednesday, sought to rebut such criticism, portraying his strategies toward Iran and North Korea as parts of the same policy.

“We have a chance at something really great for the world and great for North Korea, and great for everyone,” Trump said. Within minutes, he was also lambasting the Iranians.

Asked about Iran’s potential response, Trump warned Tehran against resuming its nuclear weapons program, saying: “I would advise them very strongly. If they do there will be very severe consequence.”

The dual nuclear crises, confronted by Trump so differently, will test a president inexperienced in diplomacy and allergic to detail who prefers an ad-hoc “govern by gut” approach. Yet the stakes could not be higher.

Administration officials say they do not believe Kim is necessarily watching the Iran episode. U.S. officials, however, have little direct insight into what the North Koreans think. An equally plausible case is that Kim would be reluctant to agree to a pact without assurances the U.S. would stick to it, or that he’d be willing to agree to provisions for which he does not think the U.S. could verify his country’s compliance.

Trump’s criticism of the Iran deal as a weak compromise could make it harder for him to accept anything short of “permanent, verifiable and irreversible” nuclear disarmament, the goal U.S officials have set.

Kim has said his goal is denuclearization of the Korean Peninsula, but it remains unclear whether he is willing to give up his entire stockpile in a way that meets the U.S. demands — and what he will demand in return.

“Trump wants an all-or-nothing deal,” Daalder said. “Anything like the Iran agreement — no weapons, but allowing limited, verifiable production of some nuclear materials — would be unacceptable.”

Yet reaching “an Iran-like deal with Pyongyang” — one requiring Kim to give up his entire arsenal of nuclear warheads, destroy his large uranium and plutonium production facilities, and permit inspectors on the ground — would be “a miraculously grand achievement” which “seems beyond reach,” Daalder said.

Other analysts, however, minimized the risk for Trump.

If the talks collapse, Kim “can blame the U.S. as untrustworthy,” said Patrick McEachern, a North Korea expert at the Woodrow Wilson International Center for Scholars, a Washington think tank.

“But the fact of the matter is that the U.S. and North Korea fundamentally lack trust anyway, so I don’t see the Iran deal affecting North Korea in terms of how much they trust the U.S.”

Whether deliberately timed or just fortuitous, Trump is leaving the Iran agreement, and being blasted by allies for doing so, at the same time he can point to successes involving North Korea.

On Wednesday, Trump was able to announce the release of three U.S. citizens imprisoned for months by Pyongyang whom he said Secretary of State Mike Pompeo was bringing home.

“I think our diplomacy in North Korea speaks for itself,” a senior State Department official traveling with Pompeo said. Trump is “now showing what we’ve said all along: We are committed to a diplomatic solution to the nuclear crisis.”

david.cloud@latimes.com