A Colorado lawyer pleaded guilty in federal court Thursday to obstructing justice by leaking secret grand jury documents to two reporters covering the government's probe of steroids in sports.

Troy Ellerman could be sent to prison for as long as two years and fined up to $250,000 for the convictions. He also could lose his license to practice law.

The 44-year-old Ellerman entered the plea in U.S. District Court the day after federal prosecutors announced he struck a deal that would prevent two San Francisco Chronicle reporters from going to jail for refusing to divulge their source.

In court papers filed Wednesday, Ellerman said he allowed the Chronicle's 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.