By arresting Mr. Rezaian and Ms. Salehi — and unless there is an international outcry, we can expect charges of spying or endangering state security to follow — the hard-liners are sending several messages. Mr. Rezaian, who grew up in America, holds dual Iranian and American citizenship. His arrest during the nuclear negotiations throws down a gauntlet to Washington, even as it warns Mr. Rouhani and his team against pursuing reconciliation with Washington too eagerly. It seeks to remind the president who has more power where press freedoms or domestic political issues are concerned. By doing so, it aims to undercut other countries’ confidence in his ability to deliver on promises Iran might make in a negotiated deal.

The tactic is not new. The security agencies manage to discover spies and foreign plots whenever an Iranian government seeks a rapprochement with the West. In 1999, when the reformist Mohammad Khatami was president, 13 Iranian Jews from Shiraz and Isfahan, including a 16-year-old boy, were arrested on fabricated charges of spying for “the Zionist entity” and “world arrogance.” Ten were eventually sentenced to prison terms — a carefully calculated decision that defied the concerns of members of the European Union, and chilled Iran’s relations with them.

Mr. Khatami’s failure to take a stand against a trial that was widely regarded as farcical left him looking weak, as did his earlier failure to speak up when a political ally, Gholamhossein Karbaschi, the mayor of Tehran, was tried and sentenced on fabricated corruption charges. Those two events only encouraged his opponents to thwart the president in other ways, further weakening faith abroad that he had the clout within Iran’s political system — and most important, with its supreme leader, Ayatollah Ali Khamenei — to withstand pressure from the hard-liners.

One element underlying this tactic is a longstanding campaign by the security agencies to make Iranians believe that America is plotting to overthrow the Islamic Republic by using scholarly exchanges, journalists and academics to bring about a “velvet revolution” in Iran. This is a line of argument long shared by Ayatollah Khamenei, who warned in 2000: “The United States has devised a comprehensive plan to subvert the Islamic system. This plan is an imitation of the plan that led to the collapse of the former Soviet Union.”

From my own experience, I know that dual nationals are special targets for suspicion. In 2007, after visiting my ill mother, I was arrested and spent 105 days in solitary confinement at Evin Prison; almost every day, I was interrogated for eight to nine hours in a vain attempt to get me to confirm an imagined plot in Washington to set off a “velvet revolution” in Iran. I was released only after an international campaign made my fate a global issue.