Barry Bonds evaded the 15-month prison sentence prosecutors were asking for and was instead given probation for lying to a federal grand jury in a doping scandal that shook Major League Baseball.
San Francisco Judge Susan Illston sentenced Bonds to two years of probation and 30 days of house arrest. He must also complete 250 hours of community service and pay a $4,000 fine. Bonds' sentence is suspended, pending an appeal that could take at least a year.
The former San Francisco Giants outfielder and baseball's reigning homerun king was convicted of obstruction of justice on April 13, 2011 for his role in hindering a federal grand jury investigation into steroid trafficking and professional sports that implicated baseball stars, football players and other athletes had received steroids. The jury was undecided on four counts of perjury.
Prosecutors asked Judge Illston to sentence Bonds to 15 months in prison for hampering a federal investigation into Bay Area Laboratory Cooperative and individuals, including Bonds' trainer, who were allegedly involved in the illegal trafficking performance enhancing drugs.
"Bonds' pervasive efforts to testify falsely, to mislead the grand jury, to dodge questions, and to simply refuse to answer questions in the grand jury makes his conduct worthy of a significant jail sentence," prosecutors wrote the court last week.
Bonds' defense team asked for two years' probation and 250 hours of community service.
The slugger, who seemed on course to be remembered as one of baseball's greats, became the face of a doping scandal that rocked Major League Baseball.
His 2003 testimony as a grand jury witness was peppered with denials that he knowingly used steroids. Prosecutors showed Bonds his trainer's doping calendars coded with the initials "BB," and informed him about a drug test he had taken in November 2000 that showed he tested positive for testosterone.
Bonds was unshaken and stood by his denial that he never "knowingly" used performance enhancing drugs.
Like other athletes who testified, Bonds had signed a document that said he would give truthful testimony, no matter how damaging, and in return he would be immune from prosecution.
But federal prosecutors had an arsenal of evidence and were convinced the home-run slugger was not being forthcoming. A federal grand jury agreed and handed up an indictment.
A handful of professional athletes testified in the BALCO case, including track star Marion Jones, who received six months in prison and New York Yankees star Jason Giambi, who avoided prosecution and admitted to using performance-enhancing drugs.
Judge Illston had previously handled sentencing in three other cases involving athletes lying to federal investigators about their use of steroids and where and how they obtained them.
Former lineman Dana Stubblefield, former Olympic cyclist Tammy Thomas and track coach Trevor Graham were all sentenced to probation.
The 2002 federal probe became one of the most explosive scandals in sports history.
Bonds' career spanned from 1986 until 2007. As an outfielder, he was a 14 time all-star and an eight-time Golden Glove winner.
ESPN contributed to this report