This article originally appeared on The Conversation.

President Donald Trump is set to become the first sitting U.S. president to meet with a North Korean leader after accepting Kim Jong Un’s invitation for direct nuclear talks.

This will put Trump’s ability as a self-professed deal-maker to the test. Although the North has agreed to refrain from any nuclear explosive and ballistic missile tests leading up to and during the talks, any larger agreement on a nuclear freeze or roll back will require patient diplomacy.

Trending: Who Are Stormy Daniels' Ex-Husbands, Michael Mosny and Pat Myne?

View photos Trump Kim Jong Un More

REUTERS/Kevin Lamarque, KCNA/Handout

I’ve worked on issues related to nuclear diplomacy and nonproliferation at the State Department and Department of Defense, and in academia. In my view, it is clear that the United States will have to make significant concessions to achieve a comprehensive permanent agreement.

Negotiations at this high a level present an opportunity, but it will be challenging. We can gain important insights from past negotiations.

Negotiating with North Korea

North Korea’s Kim Jong Il—the current leader’s late father—and Kim Il Sung, the founder of North Korea, have frequently been characterized as crazy, irrational and unpredictable. But both negotiated with the United States and other parties. During the Clinton and George W. Bush administrations, they did what rational actors do – tried to get the best deal they could that satisfied North Korea’s interests.

Some analysts argue that Pyongyang didn’t honor the agreements that were achieved in those negotiations. This is only partially true. What happened is more complicated than many critics of diplomacy often admit.

In 1994, President Bill Clinton’s administration negotiated what was dubbed the “Agreed Framework.” In return for freezing operation of its nuclear reactor and plutonium reprocessing plant at Yongbyong, North Korea would get two more proliferation-resistant light water nuclear power reactors, the removal of sanctions and a commitment to eventually normalize relations between the two countries. While the reactors were being built, a U.S.-led consortium would provide North Korea with shipments of heavy fuel oil to address its power needs.

Don't miss: Parkland Shooting Survivors Slam Santorum's CPR Comment

But Congress was slow to remove sanctions on Pyongyang, as they had agreed to do. Movement on construction of the light water reactors was hampered by a number of factors, which infuriated North Korea.

The deal fell apart when the Bush administration took over and accused North Korea of clandestinely developing a uranium enrichment program or another route to the material necessary for a nuclear weapon.

While a uranium enrichment program did indeed signal that North Korea might still be pursuing a nuclear weapons option, it was not technically a violation of the Agreed Framework. Had the Bush administration addressed the uranium enrichment issue separately, I believe it might have saved the agreement and frozen the North’s nuclear program.

Instead, the entire deal collapsed in 2002. North Korea withdrew from the Nuclear Nonproliferation Treaty the following year and continued to develop its weapons, testing its first in 2006. As a former senior George W. Bush official told me in 2007, the “ABC” policy—“anything but Clinton”—was the initial major motivator for abandoning engagement as a policy with North Korea.