There’s one statistic that underscores just how difficult it will be for the Trump administration to achieve its goals regarding North Korea. Following the North’s test of its most powerful nuclear bomb yet, U.S. Defense Secretary James Mattis reaffirmed America’s commitment to “the denuclearization of the Korean peninsula,” which would require North Korea to give up all the nuclear weapons that it built and controls. Only one country  has ever done that, and that country’s nuclear-weapons arsenal was far less advanced than North Korea’s is now. What U.S. leaders are trying to do is largely unprecedented.

“In any way I can think about it, [the North Korean case] is unique,” said George Perkovich, a nuclear-weapons expert at the Carnegie Endowment for International Peace.

Numerous countries have pursued nuclear weapons but stopped short of procuring them, abandoning the effort either of their own accord or under duress. But it’s much riskier to apply pressure on a state that has already acquired nuclear bombs, especially when that state is just a nuclear-tipped missile away from its chief adversaries (South Korea, Japan, and so on) and has staked its survival (specifically the endurance of the Kim regime) on those weapons.

The number of nuclear-armed states that have been downgraded to ordinary states is also exceedingly small. Three former Soviet republics—Belarus, Kazakhstan, and Ukraine—relinquished their nuclear arms and agreed to not produce new ones after the fall of the Soviet Union. But they inherited those weapons from the U.S.S.R. and never had full authority over them. Not only did the Russian military control the weapons, but the republics “didn’t have people who could assemble nuclear weapons, who could maintain nuclear weapons,” according to Perkovich. The three nations returned the nuclear weapons stationed on their soil to Russia, where the arms could be destroyed, in exchange for something they coveted more at the time: American diplomatic and economic support for the newly independent countries. The unraveling of the Soviet Union “happened so quickly that political parties didn’t mobilize in those countries and say, ‘Wait a minute. We can get a better price,’ or, ‘Wait a minute. Russia may become nasty again,’ etc.,” Perkovich said.

The sole precedent for the type of outcome the U.S. is seeking on the Korean Peninsula is South Africa, which secretly embarked on a nuclear-weapons program in the mid-1970s out of concern that the Soviet Union was expanding its influence in southern Africa. (The Soviet Union had, for example, supported African liberation movements and Cuba’s military intervention in Angola.) The fear was that the Soviets might turn to South Africa next. Since South Africa was increasingly isolated internationally as a result of apartheid, its system of racial segregation and discrimination, the country’s leaders weren’t sure they could count on assistance from the United States and its allies in the event of aggression by the Soviets or their local proxies. So they developed half a dozen “Hiroshima-type” atomic bombs as a “deterrent,” according to former South African President F.W. de Klerk.

It was de Klerk who made the decision to do away with a nuclear-weapons program that he controlled. I spoke with him to get a sense of what motivated him to make a move that no one else in history has.

The thinking behind South Africa’s nuclear program was “If we have nuclear weapons, and if we then would disclose in a crisis [involving the Soviet Union] that we have it”—by, for instance, informing Western powers of their nuclear capability or conducting a nuclear test and threatening to use the device—then the Americans might be persuaded to come to South Africa’s defense rather than risk nuclear war, de Klerk told me.

De Klerk cited three reasons why he took the step, after becoming president in 1989, to dismantle South Africa’s nuclear arsenal and sign the international nuclear nonproliferation treaty. To begin with, he himself was opposed to nuclear weapons. When he first learned of South Africa’s covert nuclear program, as energy minister in the early 1980s, he said that he “never felt comfortable with it” but “couldn’t stop it.” He felt that it would be “meaningless to use such a bomb in what was essentially a bush war—that it was unspeakable to think that we could destroy a city in one of our neighboring countries in any way whatsoever.” The nuclear program struck him as “a rope around our neck,” he added. “You have something which you never intend to use, really, which is unspeakable to use, which would be morally indefensible to use.”

Second, the external threats facing South Africa changed considerably. The Berlin Wall came down. The Soviet Union disintegrated. Cuban troops withdrew from Angola. De Klerk said he faced some pressure to maintain the nuclear program, into which the government had poured $250 million, from South African defense officials, who argued that “you shouldn’t give away something you have already.” But “even if you were a supporter of having nuclear weapons,” he noted, by the late 1980s and early 1990s, “the rationale for that fell away” in South Africa.

Third, South Africa was in the midst of an internal political transition. De Klerk, who is white, was negotiating an end to apartheid and a transition of power to Nelson Mandela, and he was determined to end South Africa’s pariah status as part of that campaign. One way to “achieve re-acceptance in the international community would have been to take [the] initiative, without any pressure from outside, to bring [the nuclear] program to an end,” he explained. (De Klerk denied that, as The New York Times reported in 1993, his government was also moved “by a desire to prevent [South Africa’s] atomic weapons from someday falling into the hands of a black government.” “It was not part of my motivation,” he said.)

The former South African leader agrees that Kim Jong Un does not share his personal misgivings about nuclear weapons, but “the lesson we’ve learned in South Africa, in a wider context apart from nuclear weapons, is that only through negotiation, only if enemies or opponents talk to each other, can peace be achieved, can a new dispensation be agreed upon,” he told me. The United States and its allies have tried beating North Korea with a whole bunch of sticks over the years, he observed. And while sticks have their place, he wondered whether a more enticing carrot could be designed—a peace treaty between North and South Korea, for example—that could dramatically alter the North’s perception of external threats and internal calculus about the value of engaging with other countries.

While South Africa didn’t confront much international pressure over its nuclear program (the program’s existence was long suspected in foreign capitals, but not confirmed), it did face an array of sanctions over apartheid. And from that experience, de Klerk learned one other lesson about ending a problematic policy. The “inner conviction” of a country’s leaders “weighs heavier on the scale than international pressure,” he told me.

“When a country’’s determination to have nuclear weapons is driven by its perception of a powerful threat to its security,” measures such as economic sanctions have little impact “until those security threats are diminished,” the nuclear nonproliferation expert Frank Pabian wrote in his study of South Africa’s nuclear program. “The South Africa case demonstrates the difficulty of preventing proliferation in a state that, having once acquired the requisite fissile materials, is committed to producing nuclear weapons.”

Perkovich, however, stressed the limits of the South African case as an analogue for the nuclear challenge posed by North Korea. The North’s nuclear arsenal is far more sophisticated than South Africa’s; Kim Jong Un’s nuclear weapons are more numerous and more powerful, and he also possesses a variety of missiles to deliver them to adversaries near and far. “Even if the world had wanted to try to force South Africa to give [its nuclear weapons] up, South Africa couldn’t hurt anybody in retaliation to that effort” because the relatively crude bombs were largely for show, Perkovich said.

The South African government, moreover, renounced its arsenal voluntarily amid a political transformation, not because international coercion finally forced it to capitulate. There is no historical case of a country surrendering its entire nuclear arsenal because of international pressure to do so, Perkovich noted. Not one.

A treaty to formally end the Korean War could be dangled in front of the North Koreans, he said, but the best-case scenario at this point is that this would encourage Kim Jong Un to limit his nuclear-weapons program, as other countries have done in response to shifting security threats, rather than scrap it altogether.

Joel Wit, an expert on North Korea’s nuclear program, once told me that “every country that builds nuclear weapons addresses an issue, which is: How much is enough?” And, according to Perkovich, nuclear powers typically make that calculation themselves rather than bending to the will of others. Russia and the United States decided to jointly reduce the size of their nuclear arsenals after recognizing, especially once the Cold War ended, that they had gone “insane” in enlarging those arsenals at the height of their rivalry. Limits on other nuclear-weapons stockpiles have all been strategic: China views such arms as a deterrent rather than as war-fighting weapons; France and the United Kingdom can count on U.S. protection in the event of all-out war with a country like Russia; Israel doesn’t face a major threat from a nuclear power. India and Pakistan are still building up their nuclear arsenals, despite international efforts to stop them.

The lesson from U.S.-Russian nuclear-arms reductions, Perkovich said, is that “when the political relationships changed and the types of war you were worried about being conducted changed … you could reduce nuclear weapons.”

On the other hand, North Korea could demand to have it all—the nukes and peace on the peninsula. Perkovich said North Korean officials have told him they want what India got—nuclear weapons and normal relations with the United States, after years of the U.S. punishing and ostracizing India for its pursuit of nuclear weapons. The North Korean officials told him, “‘This isn’t about us and it’s not about India. It’s about you. When the United States decides to change its mind and change the rules, it does it,’” Perkovich recalled.

De Klerk has argued that a country can better ensure its long-term security by removing its nuclear weapons than by retaining them. He told me he has “never doubted” his decision to remove South Africa’s nuclear deterrent. But Kim Jong Un’s government has made the opposite case: that the lesson to be drawn from the grisly demise of Saddam Hussein in Iraq and Muammar Qaddafi in Libya, who both never completed their nuclear-weapons programs and died at the hands of the United States and its allies, is to secure the regime’s survival by obtaining the bomb. Leonid Kravchuk, the former president of Ukraine, has defended his decision to transfer the country’s nuclear weapons to Russia. But he’s also expressed regret about trading those weapons for weak Russian and American security assurances that vanished when Russia invaded Ukraine in 2014. “I feel cheated and offended,” he said in 2015. “We set an example. I was proud of it. I thought that everyone thinks alike. It turns out [the negotiators] all understood it only up to [the] point when they left the building. All was forgotten once the doors shut behind them.”

Absent the Kim regime collapsing or being overthrown, there’s a chance the North could be convinced to restrict its program to “have no offensive or real military utility, but just as a core deterrent for regime survival,” Perkovich told me. “It’s far less than the denuclearization that [the United States has] been demanding, but I think it’s more feasible. That’s the only way we’re going to get a diplomatic resolution to this thing.” And, as de Klerk might argue, a diplomatic resolution is the only kind of resolution that truly resolves anything.