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

But Trump’s exit from the Iran deal may in fact make reaching its goal with North Korea more difficult, leaving America’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 dozens 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 the Chicago Council on Global Affairs. “That will make reaching any agreement with North Korea that much more difficult.”

Trump, speaking to reporters Wednesday at the White House before a Cabinet meeting, 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, adding that “people never thought” he’d be able to pull it off. Within minutes, he also was lambasting the Iranians.

“So we have terminated a terrible, terrible deal that should have never, ever been made,” he said, adding that future talks with Tehran might be difficult “because I don’t think they do understand life.... It’s bedlam and death [in the Middle East] and we can’t let that happen.”

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

Administration officials say they do not believe Kim is necessarily watching the Iran episode. If he is, they say, the message he will take away will be one of U.S. resolve that will make him more eager to sit down with Trump in a nuclear summit expected to take place within weeks.

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 that 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. In the past, Kim’s definition of disarmament has included the removal of U.S. troops from South Korea, although he has not yet issued that demand this time around.

“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” that “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.”

Trump might feel cornered into reaching a pact with Kim because of the importance attached to their summit and because he would be determined to prove his deal-making ability. Some critics fear he might be willing to make more concessions than would be advisable.

But administration officials, including Secretary of State Mike Pompeo and national security advisor John Bolton — both of whom advocate a hard line on North Korea — are likely to press Trump to demand more far-reaching terms than Iran agreed to.

“The message to North Korea is the president wants a real deal,” Bolton told reporters Tuesday.“The Iran deal did not do that.”

Bolton added that robust inspections and verification would be “absolutely essential.”

“Another aspect of the withdrawal [from the Iran pact] is to establish positions of strength for the United States,” Bolton said.

Even if Kim agrees in principle to give up all or part of his nuclear stockpile and accept limitations on his missiles, he is unlikely to agree to unrestricted inspections, making verification of the deal difficult if not impossible, analysts said.

“Trump will have to insist on a deal with Pyongyang that is of an even higher standard than was reached with Tehran,” tweeted Abraham Denmark, a former Pentagon official responsible for Asia in the Obama administration. “Yet it is unlikely that North Korea would agree to an agreement similar to [the Iran deal], let alone above and beyond it.”

Mark Fitzpatrick, executive director of the Americas division of the International Institute for Strategic Studies, was among many experts who said Trump’s withdrawal from the Iran deal eroded Washington’s bargaining powers and made the already tough goal of reaching agreement with Kim more remote.

“Beyond Europe, American credibility worldwide will go down the tubes, with this administration being seen as senseless and arrogant,” said Fitzpatrick, a former senior State Department official who handled nonproliferation issues.

Trump’s abrogation “gives a new writ to nuclear lawlessness, since Iran’s having abided by the agreed rules will be proven to have been in vain,” he added.

Whether deliberately timed or just fortuitous, Trump is leaving the Iran agreement, and being excoriated by allies and the foreign policy establishment 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 Pompeo was bringing home. Trump had revealed the day before — as he told the world he was dumping the Iran deal — that he had dispatched Pompeo to North Korea to discuss summit details with Kim.

“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

Twitter: @davidcloudLAT

tracy.wilkinson @latimes.com

Twitter: @TracyKWilkinson