A Washington court sent New York Times reporter Judith Miller to prison on Wednesday for refusing to divulge the name of a source to a grand jury probing the leak of the identity of a Central Intelligence Agency agent.
Citing Miller for contempt of court, Judge Thomas Hogan jailed the veteran reporter until she agrees to testify or until the grand jury's mandate runs out in four months.
"If journalists cannot be trusted to guarantee confidentiality then journalists cannot function. There cannot be free press," Miller told the judge.
"I am here today because I believe in the rule of law and your right to send me to prison for disobeying your ruling if you choose to do so," she said.
Another journalist who had been facing possible prison time in connection with the case, Time magazine's Matthew Cooper, told the judge that he had agreed to testify to the grand jury.
Cooper said his source had given him a personal waiver allowing him to testify.
"I am prepared to testify. I will comply" with the court's order, Cooper told Hogan.
Cooper took the podium in the court and told the judge, "Last night I hugged my son goodbye and told him it might be a long time before I see him again."
"I went to bed ready to accept the sanctions" for not testifying, Cooper said. But he told the judge that not long before his early afternoon appearance, he had received "in somewhat dramatic fashion" a direct personal communication from his source freeing him from his commitment to keep the source's identity secret.
Miller and Cooper have been at the centre of a high-stakes case thick with political intrigue, enmeshing the White House, press freedom and the rationale for the Iraq war.
They had refused to name their sources to a federal prosecutor examining which Bush administration official leaked the name of CIA spy Valerie Plame during a fierce row over Iraq's alleged weapons of mass destruction program.
Plame's husband, former US ambassador Joseph Wilson, claimed her cover was blown in revenge for an article he penned in The New York Times criticising Bush's justification for war with Iraq.