Updated

Two San Francisco Chronicle reporters will avoid jail time after a criminal defense lawyer agreed to plead guilty to leaking them secret grand jury documents from the BALCO steroids investigation.

Attorney Troy Ellerman admitted in court papers filed Wednesday that he allowed reporters Lance Williams and Mark Fainaru-Wada to view transcripts of the grand jury testimony of baseball stars Barry Bonds, Jason Giambi, Gary Sheffield and sprinter Tim Montgomery, according to court documents.

The Chronicle published stories in 2004 that reported Giambi and Montgomery admitted taking steroids while Bonds and Sheffield testified that they didn't knowingly take performance enhancing drugs.

A federal judge ordered the reporters jailed after they refused to divulge the source of the story. They have remained free pending an appeal to the U.S. 9th Circuit Court of Appeals. Ellerman's plea agreement stated that the federal prosecutors will no longer try to put the reporters in prison.

The deal calls for Ellerman to spend two years in prison and pay a $250,000 fine; the terms are subject to approval by a judge. No date has been set for the plea hearing.

Ellerman, who serves as commissioner of the Professional Rodeo Cowboys Association, represented Victor Conte, founder of the Bay Area Laboratory Co-operative, the Burlingame supplements lab at the center of the federal steroid probe. He later represented vice president James Valente.

Chronicle Managing Editor Robert Rosenthal declined to immediately comment and referred calls to the newspaper's lawyers.

Ellerman's attorney, Scott Tedmon, could not immediately be reached for comment.

Conte and Valente were among five men who pleaded guilty in an earlier phase of the investigation, along with chemist Patrick Arnold, Bonds' personal trainer Greg Anderson, and track coach Remi Korchemny.

Bonds has never been charged but a cloud of suspicion continues to plague the San Francisco Giants slugger as he chases baseball's career home run record. He told the grand jury he thought Anderson had given him flaxseed oil and arthritic balm, rather than the BALCO steroids known as "The Clear" and "The Cream." A federal grand jury is investigating Bonds for possible perjury and obstruction of justice charges.