The wiretap must have kept somebody very busy, because Sheikhzadeh, who lived alone in a West Village apartment furnished mainly with books, was the sort of person who liked to talk on the phone. His friends puzzled over his Spartan existence and his acceptance of a part-time job aggregating news reports for the Iranian mission. He had a Ph.D. in political science from Columbia University. He grew up wealthy, the son of an industrial magnate in Iran, and many of his childhood acquaintances went on to become famous politicians and intellectuals. But Sheikhzadeh preferred a simple life, and his friends benefited from his availability. He was funny, irreverent, erudite and kind, the sort of person who called your elderly mother, visiting from Iran, to entertain her in her native language while you were at work. He had a receding hairline, an aquiline nose and an air of good health from practicing yoga and swimming.

Sheikhzadeh refused the F.B.I.’s offer. The suggestion that he spy on his colleagues was an affront, he felt, to his honor and integrity. Instead he appeared before a federal judge in the Eastern District of New York. Even after his brother put up $3 million in bail, the prosecutor argued that Sheikhzadeh was a flight risk. He was fitted with an ankle bracelet that essentially confined him to a swath of Manhattan below 34th Street and west of Fifth Avenue, and which mortified him no end. He couldn’t swim, and he felt himself a marked, degraded man. Friends stopped calling, maybe because they feared the wiretaps, or maybe because they saw the headlines from his case and couldn’t be sure he wasn’t a dangerous criminal. He developed bags under his eyes and an edge in his voice.

He didn’t contest that he had cut some corners. When his roommate moved out and his rent jumped to $1,700 a month from $600, Sheikhzadeh stopped reporting his income, which amounted to something like $28,000 in a typical year. He had inherited money that was sitting in a bank account in Iran. Accessing it was a puzzle under the sanctions regime, and so he did what he understood a lot of Iranians did. A friend or relative in the United States would ask for help getting money to a loved one in Iran for, say, a down payment or a medical treatment. The friend would give Sheikhzadeh the cash, and then Sheikhzadeh would have an equivalent amount disbursed from his Iranian account to the recipient in Iran. He did it only for people he was close to — he wasn’t running a business — but legally he should have had a license from the Office of Foreign Assets Control (OFAC). Not that OFAC licenses were all that useful. Even when you had one, American banks would often decline Iranian transactions as too risky, or worse, close your account.

Sanctions cases like Sheikhzadeh’s, involving neither banned goods nor profits, are often resolved without going to court. But for some reason, Sheikhzadeh faced criminal charges, and the government seemed determined to put him away. On Nov. 21, 2016, he entered a guilty plea, thinking that would be the end of it. But seven months later, the government declassified some of its wiretaps and insinuated that Sheikhzadeh just might be an undeclared foreign agent who recruited people to do the bidding of the Iranian government and had introduced Zarif to an Iranian nuclear scientist living in the United States. There was no corresponding charge, just a request for an above-guidelines sentence of more than five years for the crimes to which he had pleaded guilty.

When Sheikhzadeh testified at his own sentencing hearing in February 2018, the Brooklyn courtroom buzzed with federal agents, a phalanx of dark suits and ties occupying at least one full row of the gallery. He answered questions about his work for the United Nations mission, which involved culling public material about Iran into reports that he presented at weekly meetings. True, he rubbed shoulders with Iranian intelligence operatives at the mission. He never asked these people what they did, he protested. That was their business. And it was also true that he knew some Iranian dignitaries from his high school. The nuclear scientist, he explained, was an acquaintance who helped him make sense of the technical reporting around the negotiations. “And do you think that people in Iran who work on this issue — that I helped them to advance how to develop a nuclear enrichment capability?” he asked incredulously. “Really makes me laugh.”

The prosecution had described “a defendant whose life appears to have been devoted to furthering the interests of the government of Iran,” someone who pursued these goals “while operating in the shadows and failing to report the true nature and scope of his work to U.S. authorities.” And yet, even with all their intercepts, the government came up with no evidence to suggest that Sheikhzadeh had done anything illegal beyond the charges under plea. The defense retorted that Sheikhzadeh was not only the target of F.B.I. retaliation but possible “trade bait,” calling him “a pawn to be used in a theoretical prisoner exchange between Iran and the United States.”

If this were true, perhaps the judge would have sentenced Sheikhzadeh to more than the three months she gave him on the sanctions charge. Still, Sheikhzadeh’s life was a shambles. He had already paid in fines and forfeiture, to say nothing of nearly two years with the ankle bracelet. He was 62, and he was to serve starting April 10 at a federal facility called Metropolitan Detention Center, Brooklyn, which is being sued by former inmates for the abuse and mistreatment of Muslim detainees.