Former San Francisco Giants outfielder Barry Bonds leaves the U.S. federal courthouse following his sentencing hearing in San Francisco
Former San Francisco Giants outfielder Barry Bonds leaves the U.S. federal courthouse following his sentencing hearing in San Francisco, December 16, 2011. Reuters

Home-run king Barry Bonds avoided a prison sentence on Friday over a single criminal conviction related to an investigation of steroids in sports, a punishment one prosecutor called a slap on the wrist.

U.S. District Judge Susan Illston sentenced Bonds to two years probation, along with 30 days of home confinement, 250 hours of community service, and a $4,000 fine.

Illston handed down the punishment at a hearing in a San Francisco federal court, and she immediately stayed it pending appeal. U.S. prosecutors had sought a 15-month prison sentence, while Bonds asked for probation.

After the hearing, Bonds's attorneys vowed to keep trying to erase the conviction.

At the moment, he is branded a felon, we think unjustly, said Bonds' attorney, Dennis Riordan.

And just as we aggressively fought the case at trial we intend to fight it on appeal.

Dressed in a dark suit, Bonds sat still and quiet as the sentence was read, and he declined an offer by Illston to allow him to make a statement. But he broke into smiles and hugged family and supporters once he left the courtroom.

Prosecutors had accused Bonds of lying and misleading a grand jury and on Friday said the behavior was nothing new.

The defendant lived basically a double life for decades before this. He was well versed in misleading people, said prosecutor Matt Parrella asking for jail time for the slugger.

The prospect of confining Bonds to his palatial home was almost laughable, Parrella said.

But Illston followed the probation office's suggestion of no time behind bars. The judge said she was impressed by Bonds' charitable works done outside the public eye.

A Northern California jury convicted Bonds in April on one count of obstruction of justice, but deadlocked on three other counts of lying to a grand jury.

The steroids scandal has tarnished some of the biggest stars in baseball.

Bonds, a record seven-time Most Valuable Player in the National League, made the league all star team 14 times, playing for the San Francisco Giants and Pittsburgh Pirates.

Other stars tainted by the doping scandal include sluggers like Mark McGwire and Jason Giambi and pitcher Roger Clemens.

The Bonds prosecution stemmed from his testimony to a 2003 grand jury investigating the Bay Area Laboratory Co-operative, or BALCO.

In his testimony to the grand jury, Bonds admitted getting flaxseed oil, vitamins, protein shakes and creams from his trainer, but said he had no knowledge of human growth hormones or steroids. He said no one had ever injected him apart from medical doctors.

Bonds finished his career in 2007 with 762 home runs, the most in the history of Major League Baseball. Bonds, who spent much of his career with the San Francisco Giants, also set the single-season home-run record with 73 in 2001.

An appeal by Bonds could take many months, his attorneys said on Friday. Prosecutors have already dismissed the counts on which the jury deadlocked, and defense lawyers said they expected those charges would not be revived.