WASHINGTON - Judith Miller, the New York Times reporter who has been jailed since July 6 for refusing to testify in the C.I.A. leak case, was released from a Virginia detention center this afternoon after she and her lawyers reached an agreement with a federal prosecutor to testify before a grand jury investigating the matter, the paper's publisher and executive editor said.
Ms. Miller was freed after spending more than 12 weeks in jail, during which she refused to cooperate with the criminal inquiry. Her decision to testify came after she obtained what she described as a waiver offered "voluntarily and personally" by a source who said she was no longer bound by any pledge of confidentiality she had made to him. She said the source had made clear that he genuinely wanted her to testify.
That source was I. Lewis Libby, Vice President Dick Cheney's chief of staff, according to people who have been officially briefed on the case. Ms. Miller met with Mr. Libby on July 8, 2003, and talked with him by telephone later that week. Discussions between government officials and journalists that week have been a central focus of the investigation.
Ms. Miller said in a statement that she expected to appear before the grand jury on Friday. Ms. Miller was released after she and her lawyers met at the jail with Patrick J. Fitzgerald, the prosecutor in the case, to discuss her testimony.
The Times' publisher, Arthur Sulzberger Jr., said in a statement that the newspaper supported Ms. Miller's decision to testify, just as it backed her earlier refusal to cooperate. "Judy has been unwavering in her commitment to protect the confidentiality of her source," Mr. Sulzberger said. "We are very pleased that she has finally received a direct and uncoerced waiver, both by phone and in writing, releasing her from any claim of confidentiality and enabling her to testify."
Mr. Fitzgerald has for more than a year sought testimony from Ms. Miller about conversations she had with Mr. Libby. Her willingness to testify was based in part on personal assurances given by Mr. Libby earlier this month that he had no objection to her discussing their conversations with the grand jury, according to those officials briefed on the case.
Mr. Fitzgerald's investigation has centered on the question of whether anyone in the Bush administration illegally disclosed to the news media the identity of an undercover C.I.A. employee, Valerie Wilson, whose name was first published in July 2003 in a syndicated column by Robert F. Novak. A secondary focus has been whether government officials were truthful in their testimony to investigators and the grand jury.
Ms. Miller never wrote an article about Ms. Wilson. Mr. Fitzgerald has said that obtaining Ms. Miller's testimony was one of the last remaining objectives of his inquiry, and the deal with Ms. Miller suggests that the prosecutor may soon bring the long-running investigation to an end. It is unknown whether prosecutors will charge anyone in the Bush administration with wrongdoing.
The agreement that led to Ms. Miller's release followed intense negotiations between Ms. Miller; her lawyer, Robert Bennett; Mr. Libby's lawyer, Joseph Tate; and Mr. Fitzgerald. The talks began with a telephone call from Mr. Bennett to Mr. Tate in late August. Ms. Miller spoke with Mr. Libby by telephone earlier this month as their lawyers listened, according to people briefed on the matter. It was then that Mr. Libby told Ms. Miller that she had his personal and voluntary waiver.
But the discussions were at times strained, with Mr. Libby and Mr. Tate asserting that they communicated their voluntary waiver to Ms. Miller's lawyers more than year ago, according to those briefed on the case. Mr. Libby wrote to Ms. Miller in mid-September, saying that he believed her lawyers understood that his waiver was voluntary.
Others involved in the case have said that Ms. Miller did not understand that the waiver had been freely given and did not accept it until she had heard from him directly.
In written statements today, Ms. Miller and executives of The New York Times did not identify the source who had urged Ms. Miller to testify. Bill Keller, the executive editor of The New York Times, said that Mr. Fitzgerald had assured Ms. Miller's lawyer that "he intended to limit his grand jury interrogation so that it would not implicate other sources of hers."
Mr. Keller said that Mr. Fitzgerald had cleared the way to an agreement by assuring Ms. Miller and her source that he would not regard a conversation between the two about a possible waiver as an obstruction of justice.
Ms. Miller said she believed the agreement between her lawyers and Mr. Fitzgerald "satisfies my obligation as a reporter to keep faith with my sources." She added: "I went to jail to preserve the time-honored principle that a journalist must respect a promise not to reveal the identity of a confidential source. I chose to take the consequences - 85 days in prison - rather than violate that promise. The principle was more important to uphold than my personal freedom. "
Ms. Miller said she was grateful for the "unwavering support" shown by her husband, family and friends and by The New York Times. She said that she would say nothing more publicly about the case until after her grand jury testimony.
Mr. Fitzgerald declined to comment on the matter, said a spokesman, Randall Samborn.
The case has been the most significant test in decades of whether reporters can refuse to disclose to prosecutors their discussions with confidential sources. Many journalists believe that those sources would refuse to provide information if their anonymity could not be protected.
At least four other reporters are known to have provided information to Mr. Fitzgerald, but Ms. Miller had until today refused to do so. The Supreme Court refused in July to hear an appeal by Ms. Miller of a lower-court order that she be jailed for contempt for her refusal to testify.
Valerie Wilson, also known as Valerie Plame, is the wife of Joseph C. Wilson IV, a former ambassador who traveled to Niger in 2002 on behalf of the Central Intelligence Agency to investigate claims related to Iraq's nuclear weapons program. When Mr. Wilson emerged as a critic of the Bush administration in July 2003, administration officials questioned his credibility. The column by Mr. Novak said Mr. Wilson's wife, who worked for the C.I.A., had suggested the trip.
New details about the case have emerged in recent months. Karl Rove, the president's senior political strategist, and Mr. Libby, the chief of staff for Vice President Dick Cheney, both discussed Ms. Wilson with reporters, according to testimony provided by Matthew Cooper, a Time magazine reporter, and by others. But neither of the White House officials is known to have mentioned Ms. Wilson by name or to have mentioned her covert status at the C.I.A.
Mr. Cooper testified in August 2004 about a conversation with Mr. Libby conducted the previous year. But Mr. Cooper had resisted a subpoena to appear before the grand jury to discuss a conversation with Mr. Rove. Last July, after his employer, Time-Warner, complied with a subpoena seeking Mr. Cooper's notes from the period, Mr. Cooper agreed to testify, after seeking and obtaining what he called a specific waiver from Mr. Rove, releasing him from a pledge of confidentiality.
That decision left Ms. Miller alone in resisting the prosecutors' demand to testify. Much about Ms. Miler's role in the matter remains unclear. Mr. Keller, the newspaper's executive editor, has declined to say whether she was assigned to report about Mr. Wilson's trip, whether she had tried to write a story about it, or whether she ever told editors or colleagues at the newspaper that she had obtained information about the role played by Ms. Wilson.
Under the terms in which she had been jailed, Ms. Miller faced incarceration through the duration of the current term of the grand jury hearing the matter, which is due to expire on Oct. 28. Had Ms. Miller continued to resist, lawyers involved in the case believed it was highly likely that Mr. Fitzgerald would have attempted to keep her in jail by extending the grand jury's term or convening a new grand jury.
Ms. Miller had been housed at the Alexandria Detention Center, a county jail in suburban Virginia. As a federal prisoner, Ms. Miller was an exceptional case, but a spokesman for the sheriff's office, which administers the center, said that she had been granted no special privileges.