SAN FRANCISCO -- 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 other charges.

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.

"Sometimes sitting in the cooler for a long time may have a therapeutic effect and may change his mind," said U.S. District Judge William Alsup, suggesting that he could remain behind bars for as long as 16 months -- the remainder of the grand jury's term.

"Maybe in 16 months he will change his mind," Alsup said during the rancorous, hourlong hearing, after which authorities whisked Anderson into custody.

Anderson also 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.

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 Mark Geragos, the trainer's attorney, that jailing Anderson might test "how loyal your client wants to be."

"Will he go down there and say whether he injected Barry Bonds with steroids?" Alsup asked.

Geragos said he would appeal the judge's order.

Authorities are also investigating Bonds for tax evasion regarding income from sales of his sports memorabilia.

Prosecutor Matthew Parrella told the judge that the government was also investigating unnamed "athletes" associated with Anderson and said there was a "mountain of evidence" to form the basis of the questions asked to Anderson. He said the evidence included documents seized at Anderson's house in the BALCO investigation and from "testimony of other witnesses."

The name of Gary Sheffield, the New York Yankees' outfielder, 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."

Sheffield has admitted using a cream he got from Anderson two years ago, 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 a 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.

Alsup also found meritless Geragos' plea that testifying before the grand jury would violate a deal Anderson struck in 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.

Gee whiz, Greg. If there's nothing to hide, why won't you testify?

Enjoy your stay in the hole, jackass.