"There is still a realistic possibility that confinement might cause her to testify," U.S. District Judge Thomas Hogan said of the showdown in a case that has seen both President Bush and Vice President Dick Cheney interviewed by investigators.
CBS News Correspondent Jim Stewart reports Miller said: "I won't testify. The risks are too great. The government is too powerful."
Hogan then responded: "If we give her a pass this time ... then we are on a very slippery slope that leads to anarchy."
Miller stood up, hugged her lawyer and was escorted from the courtroom.
Earlier, Time magazine reporter Matthew Cooper, in an about-face, told Hogan that he would cooperate with a federal prosecutor's investigation into the leak of the identity of CIA operative Valerie Plame. He said he would do so now because his source gave him specific authority to do so.
"Last night I hugged my son goodbye and told him it might be a long time before I see him again," Cooper said as he took the podium to address the court.
"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.
As for Miller, "There will be no appeal now, all the appellate issues were exhausted last week when the Supreme Court refused to get involved in the case," reports CBS News Legal Analyst Andrew Cohen. "So in the absence of a deal with the feds, Miller will be in jail until the judge releases her, probably when the grand jury involved in the case disbands this fall.
"After some time has passed, after Miller has been in jail for a number of weeks or even months, Miller's attorneys can go back to court to try to convince the trial judge that the time for leniency has come. But unless the prosecutor backs up that request I don't think it'll have much traction."
The judge speculated that Miller's confinement might cause her source to give her a more specific waiver of confidentiality, as did Cooper's.
Cooper, talking to reporters afterward, called it "a sad time."
"My heart goes out to Judy. I told her as she left the court to stay strong," Cooper added. "I think this clearly points out the need for some kind of a national shield law. There is no federal shield law and that is why we find ourselves here today."
"Judy Miller made a commitment to her source and she's standing by it," New York Times executive editor Bill Keller told reporters.
Floyd Abrams, a prominent First Amendment lawyer who represented Miller, told reporters: "Judy is an honorable woman, adhering to the highest tradition of her profession and the highest tradition of humanity."
"Judy Miller has not been accused of a crime or convicted of a crime," Abrams said. "She has been held in civil contempt of court."
The prosecutor, U.S. Attorney Patrick Fitzgerald had responded in court to Miller's refusal to name her source by saying "we can't have 50,000 journalists" each making their own decision about whether to reveal sources.
"We cannot tolerate that," he said. "We are trying to get to the bottom of whether a crime was committed and by whom."
Another Miller attorney, Robert Bennett, said earlier that prosecutors traditionally have shown great respect for journalists and "have had the good judgment not to push these cases very often."
Hogan held the reporters in civil contempt of court in October, rejecting their argument that the First Amendment shielded them from revealing their sources. Last month the Supreme Court refused to intervene.
In court documents filed Tuesday, Fitzgerald urged Hogan to take the unusual step of jailing the reporters, saying that may be the only way to get them to talk.
"Journalists are not entitled to promise complete confidentiality — no one in America is," Fitzgerald wrote.
Fitzgerald had disclosed Tuesday that a source of Cooper and Miller had waived confidentiality, giving the reporters permission to reveal where they got their information. The prosecutor did not identify the source, nor did he specify whether the source for each reporter was the same person.
Cooper said he had been told earlier that his source had signed a general waiver of confidentiality but that he did not trust such waivers because he thought they had been gained from executive branch employees under duress. He told the court that he needed not a general waiver but a specific waiver from his source, which he did not get until Wednesday.
"I received express personal consent" from the source, Cooper told the judge.
Hogan and Fitzgerald accepted Cooper's offer.
"That would purge you of contempt," Hogan said.
Prior to the hearing, Miller argued that it is imperative for reporters to honor their commitments to provide cover to sources who will only reveal important information if they are assured anonymity. Forcing reporters to renege on the pledge undercuts their ability to do their job, she said.
Last week, Time Inc., last week provided Fitzgerald with records, notes and e-mail traffic involving Cooper, who had argued that it was therefore no longer necessary for him to testify. Time also had been found in contempt and officials there said after losing appeals it had no choice but to turn over the information.
The case is seen as a key test of press freedom and many media groups have lined up behind the reporters. Thirty-one states and the District of Columbia have shield laws protecting reporters from having to identify their confidential sources.
"This is not the first time a journalist has gone to prison to protect a source and it won't be the last time," reports Cohen. "It happens because the courts and Congress have not recognized that the First Amendment's free press rights protect journalists from having to reveal their sources during a criminal investigation."
Fitzgerald is investigating who in the administration leaked Plame's identity. Her name was disclosed in a column by Robert Novak days after her husband, former Ambassador Joseph Wilson, impugned part of President Bush's justification for invading Iraq.
Wilson was sent to Africa by the Bush administration to investigate an intelligence claim that Saddam Hussein may have purchased yellowcake uranium from Niger in the late 1990s for use in nuclear weapons. Wilson said he could not verify the claim and criticized the administration for manipulating the intelligence to "exaggerate the Iraqi threat."
Novak, whose column cited as sources two unidentified senior Bush administration officials, has refused to say whether he has testified before the grand jury or been subpoenaed. Novak has said he "will reveal all" after the matter is resolved and that it is wrong for the government to jail journalists.
Disclosure of an undercover intelligence officer's identity can be a federal crime if prosecutors can show the leak was intentional and the person who released that information knew of the officer's secret status.
Cooper spoke to White House deputy chief of staff Karl Rove after Wilson's public criticism of Bush and before Novak's column ran, according to Rove's lawyer, Robert Luskin, who denies that Rove leaked Plame's identity to anyone. Cooper's story mentioning Plame's name appeared after Novak's column. Miller did some reporting, but never wrote a story.
Among the witnesses Fitzgerald's investigators have questioned besides Bush and Cheney are Cheney's chief of staff, Lewis Libby; and former White House counsel Alberto Gonzales, who is now the attorney general.
Fitzgerald has said that his investigation is complete except for testimony from Cooper and Miller.