Updated

Barry Bonds' personal trainer was on his way back to jail Monday after being held in contempt of court for refusing to testify before a grand jury investigating the Giants slugger.

Greg Anderson could remain behind bars for more than a year while the grand jury investigates Bonds for perjury and tax evasion, regarding income from sales of his sports memorabilia.

Anderson, who has appeared five times before two federal grand juries without answering pertinent questions, was held in contempt of court for two weeks last month but was released when that grand jury's term expired.

For complete sports coverage visit FOXSports.com.

"Sometimes sitting in the cooler for a long time may have a therapeutic affect and may change his mind," U.S. District Judge William Alsup said during the rancorous, hourlong hearing, after which authorities whisked Anderson into custody.

"Maybe in 16 months he will change his mind," Alsup said, referring to the remainder of the grand jury's term.

Mark Geragos, the trainer's attorney, said he would appeal the judge's order.

The name of New York Yankees outfielder Gary Sheffield re-surfaced during Monday's hearing as an angry Alsup recited the questions Anderson refused to answer before the grand jury.

The questions included whether Anderson injected Bonds with steroids and "whether Anderson knows Barry Bonds or Gary Sheffield."

At issue is whether Bonds lied under oath when he told the grand jury investigating BALCO in 2003 that he did not knowingly use steroids and that Anderson gave him what he believed to be flaxseed oil and arthritic balm.

Anderson has refused to say whether he gave Bonds steroids. Alsup told Geragos jailing Anderson might test "how loyal your client wants to be."

Sheffield, who testified before the 2003 BALCO grand jury, has admitted using a cream he got from Anderson but said in a 2004 interview with Sports Illustrated that he did not knowingly use steroids.

In the book "Game of Shadows," however, two San Francisco Chronicle reporters wrote that Anderson put Sheffield on injectable testosterone and human growth hormone in 2002 and later sold him designer steroids known as "the cream" and "the clear."

Sheffield adopted Bonds' heavy training program when he visited the San Francisco star after the 2001 season and lived at his home in Hillsborough for two months, according to the book published earlier this year.

Although Bonds and Sheffield later had a personal falling out, Sheffield wanted to maintain a relationship with Anderson so he could keep getting the drugs, the authors wrote.

Rufus Williams, Sheffield's agent, did not immediately return calls for comment.

Anderson already has served three months in prison and three months of home detention after pleading guilty to steroid distribution and money laundering in the investigation of the Bay Area Laboratory Co-Operative, which allegedly supplied Bonds and other elite athletes with performance-enhancing drugs.

On Monday, Alsup rejected Geragos' plea that testifying before the grand jury would violate a deal Anderson struck last December to plead guilty in the BALCO case. Geragos said Anderson specifically stated he would not cooperate with the government as part of the deal.

For complete sports coverage visit FOXSports.com.