WASHINGTON — During his 2016 election campaign, Donald Trump lashed U.S. presidents for cutting “stupid” foreign deals, alleging they gave too much away to allies and adversaries alike, and insisted “the world is laughing at America’s politicians.”

National security and foreign policy experts called him naive and reckless, and warned that sensitive global diplomacy is nothing like the bare-knuckled world of New York real estate or the raw voyeurism of reality TV.

Now, as he prepares to meet North Korean leader Kim Jong Un in a historic nuclear summit Tuesday in Singapore, President Trump is putting his much-touted negotiating skills and his iconoclastic world view to the ultimate test.

“There’s no way to exaggerate how important the summit is for President Trump,” said the presidential historian Douglas Brinkley.

If Trump succeeds, “suddenly he could say ‘There’s a method to my madness, that it is about the art of the deal, and I am a big-time negotiator,’?” Brinkley said.

But if it fails, Tuesday’s summit becomes a capstone to Trump’s mounting domestic problems, including the Russia investigation and his stalled legislative agenda, from immigration to health care.

“His whole presidency is in danger,” Brinkley said.

To Trump, the summit itself has been the big prize, even though his predecessors avoided meeting North Korea’s leaders for fear of giving a photo op to an outlaw dynasty.

“Ultimately he’s going to decide what is good enough for denuclearization regardless of the history or anything else,” said Victor Cha, who headed Asian affairs in the National Security Council under President George W. Bush and who took part in nuclear talks with North Korea at the time.

Cha worries that Trump, who has shunned diplomacy in other parts of the world, is choosing to make his maiden attempt at a peace deal in North Korea.

“He has picked the hardest issue to do this, with the highest stakes, when everybody else has failed before him,” said Cha, who was briefly considered by Trump to serve as the top envoy to South Korea. “And it’s not like everybody else is stupid.”

Trump has rejected experts at every step in his march to the summit. He tweeted cartoonish taunts of Kim last year, threatened to unleash “fire and fury … like the world has never seen,” and then impulsively reversed course by accepting Kim’s invitation to meet, with little to no consultation from aides.

He has rejected lengthy briefings on arms control, and alarmed key allies in Tokyo and Seoul by saying he planned to wing it after he sizes up Kim in person. He also surprised diplomats by saying he would stop calling for “maximum pressure” on Pyongyang, and suggesting more summits with Kim, although the White House denied those were concessions.

In Trump’s rush to press the flesh with Kim, he has forced his own national security team to upend the usual planning for a presidential summit. Normally, diplomats and subject experts patiently hammer out agreements before allowing the leaders to meet in carefully scripted settings.

The summit typically comes last, in part because meeting a U.S. president is viewed as an incentive and a reward, a chance to be seen as co-equals on the global stage. In Kim’s case, the summit provides invaluable propaganda for perhaps the globe’s biggest pariah.

For Trump, the question is whether he can gain enough from Kim to declare a major foreign policy achievement, one that eluded the presidents he so often disdains.

Trump has sought to lower the bar for success. He no longer talks about winning a Nobel Peace Prize or throwing a celebration when the talks conclude. He instead described his Singapore sit-down with Kim as a “getting-to-know-you meeting, plus.”

Even some of Trump’s doubters carry shards of hope, and a bit of wonderment, that his unconventional diplomacy may crack the North Korean enigma and produce a meaningful deal to cut if not eliminate the nuclear threat.

“Donald Trump doesn’t have to be a genius. He just has to say ‘yes’ at the proper time,” said Robert Gallucci, a former ambassador-at-large who led nuclear talks with North Korea in 1994 for the Clinton administration.

Some experts credit Trump’s idiosyncratic tweets and bluster with keeping the summit alive, despite a few somersaults along the way, even as they worry that he has given up considerable leverage in the process — and that North Korea can’t be trusted to keep its promises in any case.

Catherine Killough, who focuses on North Korea’s nuclear and missile development at the Ploughshares Fund, a global security foundation in Washington, said she believes “the stars have aligned on the Korean Peninsula.”

Kim does not behave like his father or grandfather, who ruled the country before him and were driven to develop nuclear weapons with singular focus, she said.

Now that he has achieved that goal, Kim has made clear he wants to improve North Korea’s fragile economy, which could get a huge boost if he strikes a deal with Trump.

Staff writers Tracy Wilkinson and David Lauter contributed.

noah.bierman@latimes.com