Barry Bonds, who holds two of baseball’s most cherished records, was indicted in San Francisco today on four counts of perjury in connection with his testimony about his use of performance-enhancing drugs.

He was also indicted on one count of obstruction of justice. The charges stem from his testimony to a federal grand jury in December 2003 when he denied knowingly taking steroids.

Whispers about Mr. Bonds’s record-setting performances — becoming the career home-run leader with 762 and the single-season record-holder with 73 home runs in 2001 — grew louder because of his links with the Bay Area Laboratory Co-Operative. The lab, also known as Balco, has been the subject of a federal investigation on illegal steroid use. Other athletes, including the former track star Marion Jones, have pleaded guilty in connection with the case. Ms. Jones recently returned the five medals she had won in the 2000 Summer Olympic Games.

But Mr. Bonds’s lawyer, Mike Rains, said: “I am utterly confident that this case will absolutely dissipate when the misconduct of the government comes to the forefront in this case. Barry is innocent of the charges, this is ridiculous.”