A federal judge has held a Time magazine reporter in contempt of court for refusing to testify in an investigation of the leak of a CIA officer's identity, rejecting requests from two media organizations to quash federal grand jury subpoenas seeking information from the media.

U.S. District Chief Judge Thomas F. Hogan ruled that the First Amendment does not insulate reporters from Time and NBC News from a requirement to testify before a criminal grand jury that is conducting the investigation into the possible illegal disclosure of classified information. He unsealed an order that demands the "confinement" of Time reporter Matthew Cooper, who has refused to testify in the probe, but stayed it pending an appeal.

The judge's opinion, reached July 20 but not released until yesterday, will be immediately appealed, Time executives said. Hogan also issued an Aug. 6 order confining Cooper "at a suitable place until such time as he is willing to comply with the grand jury subpoena," and ordered Time to be fined $1,000 a day. The fine was also stayed while the magazine's expedited appeal is considered.

While NBC fought a subpoena issued May 21 and was included in the opinion, it avoided a contempt citation after Tim Russert, moderator of NBC's "Meet the Press," agreed to an interview over the weekend in which he answered a limited number of questions posed by special prosecutor Patrick J. Fitzgerald, NBC said in a statement.

Lawyers involved in the case said it appears that Fitzgerald is now armed with a strong and unambiguous court ruling to demand the testimony of two journalists -- syndicated columnist Robert D. Novak, who first disclosed the CIA officer's name, and Washington Post reporter Walter Pincus, who has written that a Post reporter received information about her from a Bush administration official.

Pincus was served with a subpoena yesterday after Hogan's order was unsealed.

In their statement, NBC officials said Russert agreed to the interview after first resisting on First Amendment grounds. NBC lawyers reached an accommodation with the prosecutor in which Russert "was not required to appear before the grand jury and was not asked questions that would have required him to disclose information provided to him in confidence."

Washington Post reporter Glenn Kessler agreed to a similar interview with Fitzgerald's office earlier this summer. In both Kessler's case and Russert's, prosecutors' questions concerned conversations the reporters had in early July 2003 with Lewis I. "Scooter" Libby, chief of staff for Vice President Cheney. Both reporters have said they told Fitzgerald's staff that Libby did not disclose the identity of the CIA employee, Valerie Plame, to them.

Fitzgerald has shown a continuing interest in Libby, witnesses have said, but it now appears that his reasons may be more complex than was first apparent. Libby has signed a waiver allowing reporters to tell the prosecutor whether he disclosed Plame's name to them. Prosecutors have e-mails and phone records showing his contacts with reporters, and witnesses have said they are interested in a story Cooper wrote last summer in which Libby was interviewed.

The investigation was sparked by a July 14, 2003, column by Novak that called into question the findings of an outspoken Bush foreign policy critic sent to the African nation of Niger in 2002 to investigate claims that Iraq had tried to buy uranium there for its weapons of mass destruction program. Cheney had asked for more information about fragmentary intelligence on the subject.

The envoy, former ambassador Joseph C. Wilson IV, was recommended for the CIA mission by his wife, Plame, a CIA nonproliferation "operative," Novak wrote, adding that two administration officials offered the information as an explanation of why Wilson was selected. By then, Wilson was publicly accusing the Bush administration of "twisting" intelligence, including his findings in Niger, to build a case for going to war in Iraq.

Novak's lawyer, James Hamilton, declined to comment yesterday on whether his client has received a subpoena.

Pincus co-wrote a story last October that said an administration official gave similar information to a Post reporter on July 12, 2003 -- before Novak's column appeared -- though Plame's name was not disclosed at the time. Washington Post counsel Mary Ann Werner confirmed yesterday that Fitzgerald has demanded testimony from Pincus.

"We intend to file a motion to quash the subpoena," she said.

One defense lawyer involved in the case said the judge's ruling gives Fitzgerald significant leverage to compel testimony from Novak and Pincus. "This is now open season on these reporters," the lawyer said. The court's ruling establishes unequivocally that "in a grand jury context, reporters don't have a privilege," the lawyer said.

It can be a felony to intentionally disclose an undercover CIA officer's identity.

Media lawyers involved in the case have sought to avoid a showdown in the court of appeals because their chances of winning appear remote. Citing a 1972 Supreme Court case, Branzberg v. Hayes, Hogan wrote in his opinion that the high court has found that "there is no First Amendment privilege exempting members of the press from appearing before grand juries upon issuance of a valid subpoena."

Hogan cited language from the Branzberg decision in which the justices wrote that "we cannot accept the argument that the public interest in possible future news about crime . . . must take precedence over the public interest in pursuing and prosecuting those crimes."

He wrote that the information the prosecutor is seeking from Cooper and Russert "is very limited, all available alternative means of obtaining the information have been exhausted, the testimony sought is necessary for the completion of the investigation, and the testimony sought is expected to constitute direct evidence of innocence or guilt."

Time Managing Editor Jim Kelly said reporters must be able to protect confidential sources. His magazine will file an appeal today, he said, and pursue it "if it means taking it all the way up to the Supreme Court."

NBC News President Neal Shapiro said: "Compelling reporters to reveal their newsgathering to government investigators is, in our view, contrary to the First Amendment's guarantee of a free press."

NBC has said previously that Russert was "not a recipient" of Plame's name. A statement from the network yesterday said "the Special Prosecutor's questions addressed a telephone conversation initiated by Mr. Libby and focused on what Mr. Russert said during that conversation. Mr. Libby had previously told the FBI about the conversation and had formally requested that the conversation be disclosed."

NBC officials said that at the time of the conversation Russert "did not know Ms. Plame's name or that she was a CIA operative" and "he did not provide that information to Mr. Libby." Network representatives would not elaborate on Fitzgerald's interest in learning whether Russert disclosed information to Libby.

William K. Marimow, managing editor of National Public Radio News, said he would counsel reporters to keep commitments to confidential sources, even if they are likely to spend time in jail.

"I would say to them: When you make a promise, you keep it," he said. "Keep your promise and we will do everything humanly possible to protect your right to do that."

Lucy A. Dalglish, executive director of the Reporters Committee for Freedom of the Press, said Hogan's ruling is troubling because it allows prosecutors to make their case by trying force reporters to violate confidentiality commitments, rather than by extracting answers from administration officials.

"You just can't tell me none of the people appearing before the grand jury knows who the leaker was," she said.