Updated

By Peter Henderson

SAN FRANCISCO (Reuters) - A U.S. judge on Tuesday ruled that a secret locker room audio recording about injections, urine tests and Barry Bonds could be used at the baseball home run king's perjury trial next month.

The slugger, accused of lying to a grand jury and hampering investigation of a steroid distribution ring in professional athletics, goes on trial on March 21.

U.S. District Court Judge Susan Illston, who has thrown out some key government evidence, ruled for prosecutors on Tuesday by ruling that a recording between Bonds' trainer and business associate could be heard in court, provided the government properly lays out its case.

The 2003 conversation is laden with expletives and took place in the San Francisco Giants' locker room.

Neither of the speakers, Bonds' former personal trainer Greg Anderson and the star's business associate Steve Hoskins, who recorded the conversation without Anderson's knowledge, say that Bonds took steroids.

But the two discuss Bonds taking shots of a substance that prosecutors contend was steroids, and Anderson, who previously pleaded guilty to distributing steroids, says in the context of testing athletes' urine, "... everything that I've been doing at this point, it's all undetectable."

If convicted, Bonds would face a maximum of a decade in jail on each of five counts, although Illston could decide to sentence him to far less time.

Bonds was given immunity from prosecution for his testimony in the Bay Area Laboratory Cooperative, or BALCO, steroids scandal case, but the immunity did not cover lying to the grand jury.

Illston on Tuesday also refused to drop or modify one of five charges against Bonds, in another win for prosecutors.

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 he lied about use of performance-enhancing drugs.

A government investigation of BALCO led to its founder, Victor Conte, admitted he was guilty of steroid distribution in July 2005 in a plea deal.