Unwilling to testify, Mr. Risen may end up in jail. Meanwhile, the distractions and the continued scrutiny of government investigators — sure to make sources skittish — have hurt his ability to do his job. That’s a shame given the importance of his work: it was Mr. Risen and his Times colleague Eric Lichtblau who disclosed the Bush administration’s eavesdropping on American citizens without warrants, and the recent revelations of National Security Agency surveillance have built on that foundation.

The chilling ruling by the United States Court of Appeals for the Fourth Circuit said that even though a journalist has promised confidentiality to a source, “there is no First Amendment testimonial privilege, absolute or qualified, that protects a reporter from being compelled to testify by the prosecution or the defense in criminal proceedings about criminal conduct that the reporter personally witnessed or participated in.” National security necessitates that those who illegally leak classified information be brought to justice, the court said. It added that it saw no clear legal justification for treating a reporter differently than any other citizen, and that “other than Sterling himself, Risen is the only witness who can identify Sterling as a source (or not) of the illegal leak.”

Jill Abramson, executive editor of The Times, told me she was “bitterly disappointed in the court’s decision,” calling it a blow to “the ongoing important work that journalists do in holding powerful institutions and the government accountable to the people.”

The case has real-world consequences not only for journalists but for all Americans. It is part of a troubling trend that includes unprecedented numbers of criminal investigations involving leaked information; the obtaining of reporters’ phone records; and even one government claim that a journalist “aided and abetted” a leak.

Mr. Risen says investigative reporting that includes the use of confidential sources is “the only way to keep the government accountable.”