Inside the courtroom, Bonds remained composed as a federal magistrate told him he could face jail time if convicted of the four counts of perjury and one of obstruction of justice.
The 43-year-old said little during the 30-minute hearing. He appeared relaxed as he smiled and chatted with his cadre of six attorneys. He then stood before the judge with his hands clasped behind his back and said: "I'm Barry Bonds."
His lawyer entered a not guilty plea, and Bonds was allowed to leave without posting any bail money, though he'll forfeit $500,000 if he violates the terms of his release or misses any required court appearances. A pretrial hearing was scheduled for Feb. 7, but Bonds may not have to attend.
If convicted, legal experts say Bonds could spend up to 2 1/2 years in prison.
He lingered for several minutes Friday to embrace and chat with an aunt while federal security officers scrambled to maintain order and keep the throng at bay.
As Bonds emerged from the courthouse, he waved to a small gathering of fans chanting "Barry, Barry." Hundreds of cameras and tape recorders were shoved in his face, but Bonds coolly ignored them.
Instead he posted a statement on his Web site: "I still have confidence in the judicial system and especially in the judgment of the citizens who will decide this case," Bonds said. "And I know that when all of this is over, I will be vindicated because I am innocent."
Bonds' new lead attorney Allen Ruby said he would soon ask a judge to toss out the case because of "defects" in the indictment. He declined to elaborate.
Prosecutors wanted Bonds to turn over his passport and restrict his travel to within the United States. But the judge declined after Ruby, in a sign that Bonds intends to play baseball next season, said such a restriction would interfere with his ability to make a living.
The indictment charges Bonds with lying when he testified he never knowingly used performance-enhancing drugs, even though prosecutors say he flunked a private steroids test in 2000. Bonds' personal surgeon, Dr. Arthur Ting, collected the blood sample and is expected to be called as a witness if the case goes to trial.
Former Giants teammates and other players, including Gary Sheffield and Jason Giambi, also could testify at trial, which wouldn't begin until late next year at the earliest.