The loyalty of Barry Bonds' best friend was on display again Tuesday.
"Will you testify here today?" U.S. District Judge Susan Illston asked Anderson.
"No," he replied.
The judge found Anderson in contempt of court and then ordered him into the custody of U.S. marshals. The finding means that Anderson will be forced to sit in jail until he agrees to testify or until the trial ends. The trial is expected to last four weeks.
Anderson's attorney, Mark Geragos, said he will appeal the custody order after Illston issues it in writing on Tuesday.
Prosecutors allege Anderson provided Bonds with performance-enhancing drugs and detailed instructions on how to use them.
His refusal to testify has undercut a significant portion of the government's case against Bonds because the judge has ruled much of the evidence tied to Anderson is off limits.
Anderson served more than a year in prison for refusing to testify in 2006 before the grand jury investigating the home-run record holder.
He also served three months in prison after pleading guilty in 2005 to steroid distribution and money laundering.
Earlier Tuesday morning, a federal prosecutor told jurors in his opening statement that Bonds could easily have answered questions truthfully in his 2003 testimony, but didn't.
"All he had to do was tell the truth. That's all. But he couldn't do it," Assistant U.S. Attorney Matthew Parrella said.
But Bonds' lead attorney, Allen Ruby, said Bonds did tell the truth in his two hours of testimony before the grand jury on Dec. 4, 2003. He said a "word-for-word account" in the testimony transcript will show that to be the case.
"Barry answered every question, he told the truth, he did his best," Ruby said.
Ruby said the transcript will also show that Bonds "provided the grand jury with useful information" for the panel's investigation of the distribution of performance-enhancing drugs by the Bay Area Laboratory Co-Operative, or BALCO.
Bonds, 46, faces four counts of making false statements and one count obstruction of justice. Among other charges, he is accused of lying when he told the grand jury that he never knowingly received anabolic steroids, human growth hormone or an injection from Anderson.
Parrella told the trial jury that, as is routine with grand jury witnesses, Bonds was offered immunity from prosecution for anything he told the grand jury in 2003.
The federal attorney said that prosecution evidence will show not only that Bonds failed to tell the truth, but that "he planned not to do it."
He said prosecutors will present a combination of eyewitness testimony showing that Bonds knew his statements were false as well as circumstantial evidence showing that Bonds experienced the side effects of taking steroids.
Parrella said there will be "testimony from people who knew him for decades that the defendant what he was doing."
Those witnesses will include Bonds' former girlfriend, Kimberly Bell; his former assistant and childhood friend, Steve Hoskins; and Hoskins' sister Kathy, who was a personal shopper for Bonds and allegedly saw Anderson give Bonds an injection, Parrella said.
Bay City News contributed to this story.