But U.S. District Judge Susan Illston dashed prosecutors' hopes of introducing calendars and coded drug tests they say link Bonds, 46, to steroid use. She had previously thrown out the evidence as hearsay and a new government argument for its inclusion failed to convince her.

Looking fit in a dark suit, Bonds smiled as he entered and left the courtroom and chatted with a lawyer while waiting for the judge to take the bench. More than 20 lawyers from both sides appeared in the courtroom.

Bonds passed Hank Aaron to become Major League Baseball's career home run leader in 2007, but the record was tarnished the same year by a federal indictment charging that the slugger lied about use of performance-enhancing drugs. Bonds also holds the single-season home run record of 73.

The San Francisco Giants did not renew his contract after the 2007 season and baseball's image was sullied by the BALCO affair, named after the lab associated with the drug scandal.

More than three years after the indictment, Bonds is heading to trial, with the chance to try to clean up his reputation -- or face years in prison if convicted on 11 counts of perjury and obstructing justice.

Prosecutors plan to call Bonds' former trainer, Greg Anderson, one of those who went to jail in connection with the case, but Anderson has indicated he will not testify.

Illston said, however, she would allow athletes to describe their dealings with Anderson, which the government hopes will convince a jury that Bonds was in on the action.

A government witness list includes Bonds' former teammate Benito Santiago, along with Giambi, a former slugger for the Oakland Athletics and New York Yankees, and his brother and former teammate Jeremy Giambi. The list indicates they will testify about getting performance-enhancing drugs from Anderson.

This is guilt by association, Bonds' attorney Dennis Riordan said.

All things equal, it would be OK for them to testify, Illston responded in her preliminary ruling from the bench, saying it was relevant to judging the truth of Bonds' testimony.

The trial, scheduled to begin March 21 and last two weeks or more, may be full of unusual evidence -- the government, for instance, hopes to introduce testimony on the size of Bonds' testicles to prove they were shrunk by use of steroids.

U.S. prosecutors declined to discuss the hearing. Bonds' lawyers cast it as an outright victory, since Illston quashed the government's new attempt to bring in the calendars and testimony related to them.

The case in California Northern District Federal Court is 07-cr-00732.