Barry Bonds was sentenced to 30 days of house arrest, two years of probation, and 250 hours of community service for providing a misleading statement to a grand jury. He also was fined $4,000.

Bonds, Major League Baseball's all-time home-run leader, was convicted April 13 for his testimony about whether he took performance-enhancing drugs while playing baseball.

U.S. District Judge Susan Illston in San Francisco has agreed to stay the sentence while Bonds appeals his conviction.

The prosecution had pushed for a 15-month prison sentence, but the judge decided to give the former San Francisco Giants slugger probation instead of jail time.

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.

The jury convicted him on obstructing justice by providing misleading testimony about his relationship with former trainer Greg Anderson. It came within one vote of convicting him of committing perjury in his testimony, but ultimately was only able to come to a unanimous decision on the obstruction-of-justice charge.

The case centered on Bonds' testimony during a grand-jury investigation of the Bay Area Laboratory Cooperative -- better known as BALCO.

The 47-year-old Bonds retired from baseball in 2007 after setting the career home-run record with 762.