As the nuclear negotiations between Iran and the P5+1 powers continue on past the June 30 deadline, the focus remains on the details of an agreement and whether the negotiators can come to a final resolution. But even as these details continue to be debated, it is important to consider the bigger picture – whether or not an agreement with Iran is reached. While geopolitical contexts and insular political dynamics limit the degree to which different countries’ nuclear developments can be analogized, in looking at nuclear capacity and national security on a broad scale, Ukraine and Pakistan provide two divergent models to consider.

Ukraine is currently in the throes of a war over preserving its territorial integrity. Russian military forces now occupy Ukrainian territory on the Crimean Peninsula in flagrant transgression of the 1994 Budapest Memorandum on Security Assurances. Without delving into counterfactual history, the question remains: if Ukraine retained its nuclear arsenal in 1994, which was the third largest in the world, would Russia have invaded Crimea?

The alternative to the Ukrainian model is the Pakistani model. In stark contrast to the stipulations in the Budapest Memorandum and Ukraine’s subsequent disarmament, Pakistan developed and retains nuclear weapons despite international resistance and condemnation. Furthermore, Pakistan has become an important, albeit reluctant, ally for the United States in the War on Terror, receiving billions of dollars in aid each year. This reveals not only how difficult it is to prevent a determined country from obtaining a nuclear bomb, but also the relative limits on punishing a country after its emergence as a nuclear power.

The Ukraine model demonstrates to the Iranians the costs of forgoing the development of nuclear weapons. As much as President Obama and Secretary of Energy Ernest Moniz repeat that the Iranian deal is premised on “verification, not trust,” US hypocrisy in Ukraine undoubtedly has implications for the negotiations with Iran. Senior Brookings Fellow Steven Pifer remarked on the implications of the US failure to maintain promises enshrined in the Budapest Memorandum saying, “This is not just a matter of living up to US obligations. It is also about preserving the credibility of security assurances, which could contribute to preventing nuclear proliferation in the future.”

Halting the spread of nuclear weapons has been a US foreign policy imperative irrespective of the party in power or president in office. However, there are those who argue that the benefits of Iran obtaining a nuclear arsenal are manifold, not just for Iran but possibly for the regional stability of the Middle East. Famed realist Kenneth Waltz posits that “if Iran goes nuclear, Israel and Iran will deter each other, as nuclear powers always have,” thereby restoring “stability to the Middle East.” The Pakistani model in which the ever-boiling conflict between India and Pakistan remains at a simmer provides evidence for Waltz’s claim. But even retaining the realist lens, negotiations to constrain Iran’s nuclear development can still succeed.

The theory of nuclear deterrence rests on an assumption of rationality: two nuclear powers will not go to war for fear of mutually assured destruction. Obama’s ongoing nuclear negotiations with Iran are similarly premised on an assumption of rationality, i.e. Iranians value their economy over nuclear capabilities. However, the negotiations involve more than just Iran’s economic priorities.

National security, or lack thereof, remains the single most important consideration for any state. In order for the negotiations to succeed, the United States must account for, as well as appeal to, Iran’s national security interests. At the very least, obtaining a nuclear bomb will likely prompt Saudi Arabia, a US ally and the most significant challenger to Iran’s regional dominance, to build a weapon of its own. While a deal with perceived shortcomings may similarly goad rival Gulf States to develop nuclear capacities, a regionally accepted deal has the potential to halt nuclear proliferation in the Middle East, an agenda in which Iran has a large stake.

The Ukrainian and Pakistani examples reveal much about engaging in nuclear negotiations with the United States, and they should give the Iranians pause. A deal can be salvaged, however, if the agreement is predicated on self-interest and national security, rather than economic security and trust. For Iran to willingly forgo the development of nuclear weapons, the United States and the international community must convince Iran that its national security is more stable without the bomb than with it.

Ben Polsky is an intern in the Atlantic Council’s South Asia Center.