WASHINGTON — A federal appeals court on Tuesday declined to hear an appeal by James Risen, an author and a reporter for The New York Times, who was ordered in July to testify in the trial of a former Central Intelligence Agency official accused of leaking information to him.

The decision, by the full United States Court of Appeals for the Fourth Circuit, is expected to set up an appeal by Mr. Risen to the Supreme Court in what has become a major case over the scope and limitations of First Amendment press freedoms.

“We are disappointed by the Fourth Circuit’s ruling,” said Joel Kurtzberg, a lawyer for Mr. Risen. “My client remains as resolved as ever to continue fighting.”

In July, a three-judge panel of the appeals court ruled in a 2-to-1 decision to order Mr. Risen to testify in the trial of the C.I.A. officer, Jeffrey Sterling. It is rare for a full appeals court to grant petitions to rehear cases that have already been decided by a panel. Still, the vote count was notably lopsided: 13 voted to reject the petition, while only Judge Roger L. Gregory, who had cast the dissenting vote in July, wanted to grant it.