WASHINGTON — The Supreme Court on Monday turned down an appeal from James Risen, a reporter for The New York Times facing jail for refusing to identify a confidential source.

The court’s one-line order gave no reasons but effectively sided with the government in a confrontation between what prosecutors said was an imperative to secure evidence in a national security prosecution and what journalists said was an intolerable infringement of press freedom.

The case arose from a subpoena to Mr. Risen seeking information about his source for a chapter of his 2006 book, “State of War.” Prosecutors say they need Mr. Risen’s testimony to prove that the source was Jeffrey Sterling, a former C.I.A. official.

The United States Court of Appeals for the Fourth Circuit, in Richmond, Va., ordered Mr. Risen to comply with the subpoena. Mr. Risen has said he will refuse.