Skeptics of negotiating with North Korea, including on some days the Trump administration, often point to the breakdown of the Agreed Framework as proof that diplomacy doesn’t work. In doing so, they overlook several key facts, including that the agreement succeeded for eight years and that the United States was partially responsible for its collapse. There are lessons to be learned from the Agreed Framework, especially now that the Trump administration has indicated that diplomacy is back on the table. The main takeaway should not be that diplomacy doesn’t work, but that diplomacy can and does work when pursued tactfully, seriously and patiently.

To understand the current crisis, it is important to understand the history of the North Korean nuclear program. In 1985, North Korea acceded to the Treaty on the Non-proliferation of Nuclear Weapons (NPT), thus committing to use its nuclear program solely for peaceful purposes. However, in 1992, the International Atomic Energy Agency (IAEA) raised concerns that North Korea was reprocessing spent fuel from its nuclear reactors to separate out plutonium, a material that can fuel nuclear weapons. When the IAEA requested access to relevant sites, North Korea refused and announced its intent to withdraw from the NPT.

The United States responded to the crisis not with bluster, but with diplomacy, and quickly convinced North Korea to remain a member of the NPT. Over the next year, the United States and North Korea continued to negotiate a more permanent solution to the crisis. In 1994, both parties signed the Agreed Framework , under which North Korea agreed to freeze and eventually dismantle its nuclear reactors. In return, the United States would provide North Korea with two “bomb-proof” light water nuclear reactors. While these reactors were being built, the United States would supply North Korea with heavy fuel oil to generate energy.

However, implementing the agreement proved to be challenging. North Korea found ways unrelated to its nuclear program to infuriate the United States, such as testing a ballistic missile in 1998 . At the same time, Congress obstructed some of the funding necessary to uphold the U.S. end of the deal. The lack of funding caused delays in both the deliveries of heavy oil fuel and in the construction of the light water reactors. Then, in October 2002, North Korea admitted to having a secret uranium enrichment program that could create fuel for a nuclear weapon.

By enriching uranium, North Korea did not technically violate the Agreed Framework, which only required it to stop reprocessing plutonium. But uranium enrichment clearly violated the spirit of the agreement. Even so, as former Defense Secretary William Perry has argued , the United States could have kept the agreement while negotiating a separate deal to address the North’s uranium enrichment. Instead, the Bush administration withdrew from the Agreed Framework and North Korea almost immediately restarted reprocessing plutonium. In 2006, North Korea tested its first nuclear device.

Critics of the Agreed Framework see its collapse as proof that diplomacy with North Korea is doomed to fail. This assumption seems to underlie President Trump’s North Korea policy, from his comment that former Presidents have been “ outplayed ” by North Korea to his inconsistent and unserious approach to diplomatic negotiations.

Unfortunately, this outlook ignores crucial facts. First, the Agreed Framework accomplished its objective — preventing North Korea from producing plutonium — for eight years. It may have worked for longer if the United States had not withdrawn from the agreement. Second, while North Korea was responsible for the collapse of the Agreed Framework, the United States was not without blame. Even before it was revealed that North Korea was enriching uranium, opposition to the deal in Congress was putting strain on it. Robert Gallucci, the chief U.S. negotiator of the Agreed Framework, has said that there is “some validity” to claims that the U.S. lacked the political will to enforce the agreement and to the “complaints coming from North Korea that the United States dragged its feet and reneged.”

So what should we learn from the Agreed Framework? First, diplomacy works. We made more headway in stopping North Korea’s nuclear program through diplomacy compared to our current strategy of sanctions, condemnations, and threats. Second, negotiations must have realistic, concrete goals. We are long past the point where we can easily denuclearize the Korean Peninsula. Negotiations should have, at least initially, the more modest goal of freezing North Korea’s nuclear program. Finally, diplomacy requires patience, persistence, and follow-through. There is no doubt that negotiating with North Korea is an exhausting process. But abandoning our deals when we get frustrated doesn’t solve the problem; it takes us back to square one. If President Trump really wants to improve the situation on the Korean Peninsula, he must give diplomacy a serious chance.