IT WAS NOT surprising that the Supreme Court declined on Monday to take up the case of two reporters facing jail time for refusing to testify about the leak of Valerie Plame's status as a covert intelligence operative. But the decision brought to a head a dangerous confrontation between the needs of prosecutors and the ability of the press to do the job the public expects of it. The court left Judith Miller of the New York Times and Matthew Cooper of Time magazine facing a terrible choice between testifying about a confidential source or going to jail for contempt of court. Yesterday, Time Inc. -- which had also been held in contempt for refusing to turn over documents related to Mr. Cooper's source -- announced that it was complying with the court order. This could relieve Mr. Cooper's situation, either by making his testimony unnecessary or by rendering moot his resistance to revealing his source's identity. But Ms. Miller's predicament remains.

The Plame case was not the week's only blow against the press's ability to gather the news. On Tuesday, the U.S. Court of Appeals for the D.C. Circuit upheld contempt citations against four reporters who refused to testify concerning confidential sources in a civil lawsuit brought by Wen Ho Lee, a former nuclear scientist at Los Alamos National Laboratory. The proliferation of such cases, civil and criminal, is creating an alarming climate that is incompatible with aggressive reporting about government and other public affairs. Particularly in combination with one another, the cases show the need for Congress to step in and create a privilege in federal law so that the public does not lose out on learning important news only a protected source will provide.

We don't question the legitimacy of the investigation by federal prosecutor Patrick J. Fitzgerald. Whether someone in the Bush administration knowingly leaked Ms. Plame's identity in retaliation for her husband's questioning of supposed Iraqi attempts to purchase uranium in Niger is an important question. Moreover, the facts of the case are not entirely clear: Chief Judge Thomas F. Hogan of the federal district court in Washington suggested at a hearing this week that the reporters' sources have waived any confidentiality, a claim to which the reporters did not respond. Nevertheless, it would be quite absurd, and altogether unjust, if the only people to face jail in this matter were two reporters. Whatever damage flowed from the blowing of the agent's cover, if there was any, was not the result of misconduct by Mr. Cooper or Ms. Miller -- or by columnist Robert D. Novak, who originally reported the story.

Forty-nine states and the District have laws or cases that, to one degree or another, relieve reporters of the burden of choosing between jail and violating promises of confidentiality. Reps. Mike Pence (R-Ind.) and Rick Boucher (D-Va.) and Sens. Richard G. Lugar (R-Ind.) and Christopher J. Dodd (D-Conn.) are pushing legislation to bring federal practice in line with that broad consensus. We readily acknowledge our bias here. The Post is fighting a subpoena to a reporter in the Wen Ho Lee case (a matter related to the contempt charges brought against the other journalists) and supported Mr. Cooper and Ms. Miller's appeal in friend-of-the-court briefs filed with other media organizations. Post officials are also pushing for the federal legislation to recognize a reporter's privilege. But this should not be a controversial proposal. The confidences of numerous relationships -- few more central to the functioning of democratic life than that of a reporter and a source -- are already protected in courts. It's time for Congress to acknowledge that the cost of good journalism shouldn't be prison.