The Iranians had publicly floated the possibility that such talks might be worth pursuing, but they had never acknowledged that they were ongoing, and the U.S. government had never spoken publicly about them. (The official, the State Department's Chase Foster, later emphasized that he was never willing to reveal classified information.) Foster told Schulberg an even bigger secret: The talks had been running alongside the nuclear negotiations in Switzerland, carried out by some of the same officials discussing centrifuges, inspectors and reactors -- including, our later reporting revealed, Secretary of State John Kerry and lead negotiator Wendy Sherman.

One of the four men was Jason Rezaian, a Washington Post reporter who had covered the Iran nuclear talks. Rezaian was being held on baseless charges of espionage in order to try to extract concessions from the Americans. Our source, Foster, was upset that the U.S. had failed to secure the Americans' release as part of the nuclear deal, and it was his understanding that the talks had since collapsed. But as we reported out the tip, we discovered that the talks had never really stopped.

For years, a journalistic convention has held, more or less, that hostage and prisoner swap talks ought not to be reported on if doing so risks upending the negotiations. When a member of the media is involved, especially a well-respected one like Rezaian, the pressure to stay quiet becomes much greater. The convention can extend dangerously beyond prisoner talks, with the government pressuring the press to withhold any sensitive information it claims could harm national security -- a vague concept defined by motivated minds. For a generation, national security reporting has largely been dominated by The New York Times and The Washington Post, and both have at times come under valid and withering criticism for spiking stories of public interest under pressure from the government.

In part, this reluctance to publish led Edward Snowden to look for alternative outlets for his own exposure of secrets, a phenomenon that will no doubt continue in an age when gatekeepers are losing their control over the gates. But neither The Guardian nor The Intercept, two of the outlets that have published stories based on Snowden documents, would print anything that would lead to imminent harm for a specific individual, a principle Snowden himself embraced. And that, more or less, is the thinking we decided to follow: We, too, would decline to publish a story that would cause serious harm to specific individuals unjustly held in Iran.

In this case, we were not grappling with revealing the identity of a covert agent, but rather exposing details that could upset the talks. But how can anybody know if Schulberg's story truly would have caused problems? The Iranians repeatedly told American negotiators that if word leaked out, negotiations would explode, as hardliners in Iran would maneuver to undermine them. But if that's the case, why would Iranian officials occasionally drop hints in public? What if they were bluffing? Or confused?

What added an extra wrinkle to this ethical dilemma was the State Department official, Foster, Schulberg's on-the-record source. To describe such a situation as unusual wouldn't do it justice: State Department officials with specific knowledge of prisoner negotiations don't talk publicly about them. It just doesn't happen. Yet to Schulberg's credit as a reporter, Foster was doing so in this case. His frustration motivated him to speak out. He left the State Department last year.

Any public official willing to air grievances on the record, whether those grievances are legitimate or not, should be thought of as a whistleblower. And if a whistleblower is willing to risk his career and reputation to share information he thinks the public needs to have, a news outlet needs to have an awfully good reason not to run his story. On the other hand, we never asked him not to talk to other outlets or to take his concerns public on his own, which was always an option, but one he didn't take. And had he known the talks were once again going on, that may have changed his calculus about going public, which in turn was something we had to keep in mind. And it wasn't something we could share with him. (After this story was published, Foster told The Huffington Post he never considered himself a whistleblower.)

When we reached out to the administration, the frontline press folks there were extremely aggressive and served up a bunch of garbage we later confirmed to be garbage. But when we approached administration officials higher up the chain, they told us what was actually happening. They told us that reporters for The Washington Post and The Wall Street Journal were withholding details of the talks as well, though neither knew of Foster, whose identity we never revealed to the government. They did not put hard pressure on us to hold our story, but instead calmly laid out their analysis of the possible consequences of publishing, and offered confidence that the talks were moving forward and headed toward a resolution. Several times over the course of the past few weeks, it looked like a deal could be struck any moment, but it wouldn't come together and timing would be pushed forward.

At times during the reporting process, it seemed as if the benefits of publishing were coming close to outweighing the risks. If talks stalled out, perhaps breaking news on them could kickstart them again.

This thought process itself, this gaming-out of the ramifications of publishing news, is foreign to a reporter's way of thinking. "We report, you decide" may be a discredited slogan, thanks to the cable network that has abused it in such an Orwellian way, but it does still accurately describe what motivates nearly all journalists. But at HuffPost, we acknowledge -- celebrate, in fact -- that we are not merely disinterested observers of the news, but active participants in it, whether we like it or not. With that acknowledgement comes certain responsibilities.

On Friday night, the day before the exchange was expected to happen, word began seeping around Washington. Christina Wilkie, another HuffPost reporter, got a tip from an intelligence source that Rezaian would be released after sanctions were lifted. On Saturday morning Washington time, the Iranians started talking. Iran's foreign minister, Mohammad Javad Zarif, told American reporters in Switzerland that after nuclear implementation was done, they would move on to "the other thing." The Associated Press pool reporter announced that he was going to include the comments in his pool report. State Department officials pushed him hard to shut it down; he called his bosses in the U.S., who told him to stand down. Later that morning, Iran's judiciary began telling its state-run outlets first that the four Americans were being released, and second that seven Iranians would be exchanged. Ironically, our first published report on the exchange cited Iran media, as U.S. officials worried that the deal could still fall through.

We have always taken an aggressive position on where the line should be drawn on what deserves to be public. Indeed, we collaborated with Glenn Greenwald during the time between his Guardian reporting and the launch of The Intercept, and have continued to work with the latter. None of that work, though, put lives in immediate danger, and all the talk of principle and truth-seeking is only talk until you're confronted with the very real possibility that your truth-telling could get a colleague executed. So we held the story, and are writing this one instead. We're glad we did.

This story was updated after publication to include additional comments from Foster, and to remove Foster’s account of when and under what circumstances he left the State Department. A State Department official said Foster left in March and confirmed the accuracy of the information he provided about the prisoner talks.