As the United States and Iran continue negotiating a possible breakthrough nuclear agreement, both sides are carrying concealed weapons that could be used if the talks collapse.

The threats that underlie the bargaining are rarely discussed publicly, but both countries recognize the dangers ahead if they don’t reach an agreement by the June 30 deadline. The United States’ leverage is its demonstrated ability to use cyberweapons to attack Iranian nuclear facilities; Iran’s leverage is its ability to target the 2,190 U.S. military personnel now in Iraq.

The political pressures surrounding the bargaining are evident in Tehran and Washington. Iranian President Hassan Rouhani tried to create space for a deal last weekend by arguing that Iran’s economy shouldn’t be hobbled by ideological factors, but Supreme Leader Ali Khamenei warned Wednesday that the United States couldn’t be trusted to lift sanctions. Meanwhile, conservatives in Congress are urging even more sanctions, while the Obama administration tries to pin down a deal.

An unusually detailed account of the secret cyberwar comes in “Countdown to Zero Day,” a new book by Kim Zetter, a reporter for Wired magazine. Through detailed forensic examination of the Stuxnet virus, she shows that President Obama pursued what amounted to a two-track policy: At the same time as he sought engagement with Iran, he authorized use of the computer weapon to sabotage Iran’s enrichment facility at Natanz.

Zetter’s reporting expands on earlier revelations by David Sanger of the New York Times. She explains that in January 2009, Obama offered the olive branch, pledging in his inaugural address: “We seek a new way forward, based on mutual agreement and mutual respect.” That month, the new president approved a covert “finding” that continued and augmented the cyberprogram begun by the Bush administration.

In several instances, U.S. cyberassaults appear to have escalated after Iran veered away from American efforts at conciliation. According to Zetter, a new version of Stuxnet was compiled and time-stamped on June 22, 2009; that same day, hard-line candidate Mahmoud Ahmadinejad was officially declared the winner of a contested presidential election. A new installment of the virus began infecting Iranian computers the next day.

Iran seemed serious about negotiations in late 2009. But in January 2010, it backed away from a plan to send its low-enriched uranium to Russia and France and then said it would boost enrichment of some material to 20 percent. On Jan. 25, the Stuxnet attackers “signed” an enhanced version of the malware using a stolen digital certificate, Zetter writes. This attack didn’t actually strike Iranian computers until March 23, three days after Obama sent a greeting for the Persian New Year that included a blunt assessment: “Faced with an extended hand, Iran’s leaders have shown only a clenched fist.”

Stuxnet surfaced in June 2010, when it began spreading to computers around the world. Reporting by Sanger and others later revealed that it was part of a covert attack by the United States and Israel. Despite (or perhaps because of) this assault, Iranians began secret contacts with the United States in 2012, and those became official negotiations in 2013.

The power of Stuxnet technology is that the Iranians can’t know what other malware may have been planted in their computers or what new capabilities that U.S. cyberwarriors may have developed. But it’s certain that the United States has greater capacity than has been reported or deployed and that Obama is prepared to adjust U.S. cyberactivities up or down, based on the state of negotiations.

Iran is said to have raised the Stuxnet attack in the nuclear negotiations, arguing that it shows the United States’ hypocrisy about adhering to international norms. The Iranians have to assume there’s more the United States could do, if negotiations fail.

Iran’s leverage in this game of chicken is its ability to wage covert war through its proxies in the Middle East. The threat matrix includes Iranian aid to Hezbollah in Lebanon, the Assad regime in Syria and the Houthi rebels in Yemen. But Iran’s most potent weapon is its ability to attack U.S. forces returning to Iraq to fight the Islamic State.

Iraq illustrates the U.S.-Iranian double game. Gen. Qassem Suleimani, the head of Iran’s Quds Force, has told the Iraqi government that Tehran accepts renewed U.S. military assistance to Baghdad, within limits. But his message contains an implicit warning: Iran could target U.S. forces if rapprochement collapses. U.S. attacks against the Assad regime in Syria could trigger Iranian reprisals; so could new U.S. economic sanctions.

The United States is vulnerable, but so is Iran. That’s the symmetry of this negotiation.

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.