Editor’s note: Scott Ritter was a United Nations weapons inspector in Iraq from 1991 to 1998.

President Trump made it official Tuesday, announcing that he would be withdrawing from the Iran nuclear agreement, officially known as the Joint Comprehensive Program of Action, or JCPOA. “The agreement,” he said in his speech, “was so poorly negotiated that even if Iran fully complies, the regime can still be on the verge of a nuclear breakout in just a short period of time. The deal’s sunset provisions are totally unacceptable. If I allowed this deal to stand, there would soon be a nuclear arms race in the Middle East.”

The sunset provisions of the JCPOA are among the least understood aspects of that agreement. Prior to signing the JCPOA, Iran operated more than 20,000 centrifuges for enriching uranium to use in its indigenous nuclear program. The level of enrichment attained—3.7 percent for nuclear power reactors and under 20 percent for use in a medical research reactor—was well below that needed for use in a nuclear weapon. However, the international community, led by the United States, was concerned that Iran would be able to use its large number of centrifuges to rapidly increase the level of enrichment of its uranium stockpile to more than 90 percent, allowing Iran to have the fissile material needed for a nuclear bomb (or bombs) in a very short time.

In the lexicon of the nonproliferation specialists monitoring Iran, a new term was coined—“breakout time.” This was the amount of time required for Iran, once inspectors from the International Atomic Energy Agency (IAEA) who were monitoring its nuclear enrichment efforts were removed, to produce enough 90 percent-enriched uranium to make a nuclear bomb. Using the 20,000 centrifuges it possessed, Iran’s breakout time was estimated to be around three months if using natural uranium feedstock, or around four weeks if using uranium feedstock already enriched to 3.7 percent.

The collective wisdom in the arms control community was that Iran needed to be kept to a breakout time of no less than one year. Under the JCPOA, this would be done by limiting the number of centrifuges it could operate to just over 5,000, while limiting the amount of 3.7 percent-enriched uranium it could have stored at any given time to no more than 300 kilograms. With these restrictions in place, Iran would have a breakout time of more than one year.

But for Iran, agreeing to such limitations in perpetuity made little sense. One of the considerations given to JCPOA calculus was that Iran eventually would seek to build an indigenous nuclear energy production capability, and it would require modern centrifuges capable of generating quantities of enriched uranium far in excess of 300 kilograms. Indeed, one of the key aspects of the JCPOA is Iran’s “long-term enrichment and enrichment research and development plan,” which details how Iran will proceed during the life of the JCPOA to prepare for the eventual implementation of a large-scale uranium enrichment program that would far exceed the parameters of the 12-month breakout scenario set forth in the main body of the JCPOA.

The so-called sunset clause of the JCPOA holds that after 15 years—meaning by 2030—all restrictions on the number of centrifuges Iran is allowed to operate, as well as the amount of enriched uranium it is permitted to store, will be lifted. In addition to increasing the numbers of centrifuges Iran can operate, it also will be able to start using more efficient, modern centrifuges.

For Iran, this clears the way to replace the inefficient centrifuges it can possess and operate under the JCPOA with as many highly efficient modern centrifuges it deems necessary to meet its legitimate needs for nuclear energy. The JCPOA allows for Iran to begin phasing out its older centrifuges with more capable models between years 11 and 13 of the agreement. Given the improved performance characteristics of these newer centrifuges, the one-year breakout time would be reduced to around four months sometime between years 11 and 13 of the JCPOA, or as early as 2026. It is this inevitable demise of the 12-month breakout window that prompted Trump to walk away from the JCPOA on the grounds that it no longer served U.S. national security interests.

Trump, however, was not the author of the JCPOA. That “honor” fell to President Barack Obama. On the issue of Iran, Obama proved as disingenuous as his predecessor, George W. Bush, when it came to fact-based policy on Iraq. A 2007 National Intelligence Estimate on Iran’s nuclear program concluded that Iran had not conducted any work on a nuclear weapon since 2003, and that intelligence provided to the IAEA by Israel in 2004 (which purported to prove the existence of a covert Iranian nuclear program) turned out to be of questionable provenance. The Obama administration, however, encouraged the IAEA in 2011 to release a report based upon the same discredited 2004 Israeli documents. The sole purpose of this report was to build consensus within the United States and around the world for the passage of stringent economic sanctions against Iran designed to pressure Tehran into giving up its nuclear program.

While Obama was able to use the 2011 IAEA report to push through Congress new unilateral American sanctions targeting Iranian oil sales in early 2012 (these sanctions were then used to pressure other countries to halt their purchase of Iranian oil through so-called secondary sanctions, which punished anyone operating in violation of U.S. law), it failed in forcing Iran to the negotiating table.

With everything the U.S. and its allies threw at Iran, including having Iranian citizens pay a huge economic cost in terms of a devastated economy and reduced quality of life, the pressure campaign still failed. The U.S.-led economic sanctions, rather than forcing Iran to abandon its nuclear program, empowered it to expand it efforts dramatically. The consequence was a dangerous situation. The U.S., after falsely building a narrative of Iran aggressively pursuing a nuclear weapon, now needed to either militarily confront Iran (and its expanding enrichment capacity) or find a diplomatic way out of a self-inflicted wound without losing political face at home and abroad.

The JCPOA was the result—a deal that recognized Iran’s right to enrich uranium for peaceful purposes (something the U.S. opposed for decades) while backing away from the fiction that it was pursuing a nuclear weapons program. The IAEA, the U.S. and every nation that embraced the falsified intelligence used to underpin the allegations of an Iranian nuclear weapons program—so-called possible military dimensions, or PMD—could not acknowledge that what they sold to the world was founded on lies, so they constructed an inelegant solution. The IAEA, after consulting with Iran, prepared a report that “resolved” the PMD problem once and for all, and thus paved the way for the lifting of economic sanctions.

Yes, Iran agreed to an unprecedented level of intrusive inspections and restrictions on its enrichment program. But the JCPOA’s bottom line is that Iran retained thousands of active centrifuges in full operation. This represented a major political victory for Iran, given the years-long, concerted, U.S.-led effort to deny it access to even a single spinning centrifuge. No matter how hard the Obama administration tried to sell the JCPOA as a victory for American diplomacy and international peace and security, Iran brought the U.S. to the negotiating table, emerging with a nuclear program the world had tried to prevent it from obtaining while giving up a fictional nuclear weapons program it neither possessed nor desired.

The JCPOA was made to resolve a difficult and dangerous situation the U.S. created for itself. As a result, the Obama administration had to craft an agreement built on a foundation of lies. These lies proved to be its undoing. If Iran, as the U.S. claimed in pushing for economic sanctions, possessed a nuclear weapons program, and no effort was made to ensure that it acknowledged and dismantled that program, then any agreement delaying Iran access to the ability to produce enough highly enriched uranium for use in a nuclear weapon kicked Iran’s inevitable acquisition of a nuclear bomb down the road.

This is the heart of Trump’s argument against the JCPOA: that the so-called sunset clauses limiting the number and quality of Iranian centrifuges only delay, rather than prevent, an Iranian nuclear weapons program from reaching fruition. To alter Trump’s logic, the U.S. would need to discredit the intelligence it used to justify the economic sanctions it suspended when signing the JCPOA—the same sanctions the U.S. threatened to “snap back” in place if Iran was found to be in violation, and that Trump reinstated when he pulled out of the agreement.

The U.S. failed to do this, and the onus for this failure rests solely with the Obama administration. To save political face by not having to acknowledge that the heart of its Iran policy was built on a foundation of lies, the Obama administration embedded this lie into the heart of the JCPOA in the form of the agreement to resolve the “possible military dimension” issue based upon a wink and a nod, as opposed to verifiable inspections. While this was done as a political expedient designed to breathe life into the JCPOA, it turned out to be a poison pill that killed the agreement. One need only witness the briefing by Israeli Prime Minister Benjamin Netanyahu, in which he cites a newly acquired archive of Iranian documents detailing an alleged nuclear weapons program, and the extent to which Trump relied on that presentation to underpin his decision to leave the JCPOA.

Trump will go down in history as the man who walked away from an agreement that all parties—including the U.S.—acknowledge that Iran was fully compliant with. Trump only deludes himself and those who support him by saying that his actions to confront a threat from Iran now, rather than waiting for it to manifest itself, will make America more secure. Iran’s nuclear program poses no threat to either America or the world, because it is, and always has been, a peaceful civilian program, something those in power know to be the case.

Trump was able to exploit the lies the Obama administration perpetrated in justifying his decision to walk away from the JCPOA. That fact is a sad reflection of the level of ignorance and antipathy that exists among U.S. citizens and those they elect to represent them in Congress.

Congress is, and has been, a witting facilitator of these lies. This should come as no surprise, however, because those the American people elect are a reflection of those they represent. Since 1979, when an Iranian mob took over the U.S. Embassy in Tehran and held 52 Americans hostage for more than 400 days, the American people have been programmed to accept all information that paints Iran and its theocratic government in a negative light. When President Obama said Iran had a nuclear weapons program, the American people—even after the previous administration’s lies about weapons of mass destruction in Iraq—did not demand hard evidence to back up the accusation.

Democrats will blame Trump for walking away from the JCPOA, and Republicans will blame Obama for making such a bad deal. But Congress, empowered by an ignorant American public willing to swallow at face value any news that paints Iran in a bad light, has made all of this possible. A lack of meaningful oversight of the intelligence community has allowed the lies about Iranian nuclear capability to be promulgated. Those lies were then used to impose economic sanctions intended to compel Iran to abandon a program it was not pursuing.

When examined from this perspective, Trump’s actions are a logical extension of the collective will of the American people, expressed over time through the actions of Congress. True, Obama gave us the nuclear agreement with Iran, despite its political unpopularity with Congress as a whole. Like all policies built on a foundation of lies, though, the JCPOA was doomed from its inception. Eventually, the incompatible notion of a fictional Iranian nuclear weapons ambition sold by Obama to Congress would collide with the reality of a renewed Iranian enrichment capacity once the sunset clauses of the JCPOA expired.

We can point the finger at Trump all we want, but at the end of the day, the American people—Republicans, Democrats, Independents and all others—share collective responsibility for his decision to walk away from the Iranian nuclear agreement. It conforms to a set of facts most Americans embraced, unquestioning, in endorsing a policy of economic containment that backfired.

Trump’s actions in walking away from the JCPOA didn’t shred American credibility. That happened a long time ago, before Donald J. Trump was even a glimmer in the eye of those who elected him.