A federal judge ruled late Thursday that prosecutors cannot use three positive steroid tests and other key evidence in Barry Bonds' trial next month.

The decision is a setback for the government in its five-year pursuit of Bonds, who has pleaded not guilty to lying to a grand jury on Dec. 4, 2003, when he denied knowingly using performance-enhancing drugs.

U.S. District Judge Susan Illston said the test results — urine samples that are positive for steroids — are inadmissible because prosecutors can't prove conclusively that they belong to Bonds. The judge also barred prosecutors from showing jurors so-called doping calendars that Bonds' personal trainer, Greg Anderson, allegedly maintained for the slugger.

The judge said for prosecutors to introduce such evidence, they need direct testimony from Anderson. Illston said Feb. 5 she was leaning toward that ruling.

Prosecutors allege Anderson collected the urine samples and delivered them for testing to the Bay Area Laboratory Co-Operative.

Anderson's attorney said the trainer will refuse to testify at Bonds' trial even though he's likely to be sent to jail for contempt of court.

Federal investigators seized the positive test results along with 21 other blood and urine samples, which tested negative, they allege belong to Bonds during a September 2003 raid.

Prosecutors wanted to use all the tests to show that Bonds was a frequent customer of BALCO, which was the center of a massive sports doping ring.

But the judge said that without Anderson's testimony, the tests could not be introduced at Bonds' trial, scheduled to start March 2. Anderson is alleged to have delivered Bonds' blood samples to BALCO after the slugger's personal surgeon, Dr. Arthur Ting, drew the samples.

Prosecutors said the three key tests show positive results in 2000 and 2001 for the steroids nandrolone and methenolone. The samples themselves do not identify the source, but prosecutors said business records seized in the BALCO raid tie Bonds to the positive tests.

Prosecutors had hoped to present the positive tests to the jury by having BALCO's former vice president, James Valente, testify that when Anderson handed him the urine samples, the trainer said they belonged to Bonds.

But the judge noted that Valente told a grand jury he changed a label on one of the tests from "Bonds" to "Anderson" at the trainer's request, making the lab's testing suspect.

"Valente testified before the grand jury that on at least one occasion, he mislabeled a sample," the judge wrote. "In light of this evidence that on occasion BALCO employees tampered with the labels of samples, the court cannot find that the requisite guarantees of trustworthiness are present in this case."

The ruling wasn't a complete loss for prosecutors. The judge said that they could play parts of a recording Bonds' former personal assistant Steve Hoskins secretly made of a conversation he had with Anderson in front of the slugger's locker in San Francisco in March 2003.

In that conversation, Anderson discusses how he is helping Bonds' avoid infections by injecting him in different parts of his buttocks rather than in one spot.

Bonds testified before the grand jury that no one but his doctor ever injected him.

In the recording, it also appears as if Anderson is boasting about injecting Bonds with a steroid designed to evade detection at the time.

"But the whole thing is," Anderson said, according to a government transcript, "everything that I've been doing at this point, it's all undetectable."