Former Major League Baseball star Barry Bonds was sentenced to 30 days of house arrest and 2 years probation on Friday for his federal conviction of obstruction of justice. 

Bonds arrived at the federal courthouse in San Francisco in an SUV with tinted windows and emerged from the back seat wearing a dark suit and tie. He was met by a phalanx of cameras, though the crowd was much smaller than when he was charged about four years ago. In 2007, Major League Baseball's all-time home runs leader was still playing for the San Francisco Giants.

Bonds had faced up to 21 months in prison for giving misleading testimony before a grand jury.

A federal judge stayed Bonds' sentence of house arrest, pending appeal.

Prosecutors in September dropped those deadlocked charges, giving up on another trial.

Bonds, Major League Baseball's career leader with 762 home runs, now has 14 days to file his intention to appeal his conviction.

Bonds is the highest-profile defendant, and the last, to come out of the government's investigation of the steroids distribution ring built around the Bay Area Laboratory Co-Operative, founded by Victor Conte.

Besides the former National League MVP, 10 people were convicted of various charges. Six of them, including track star Marion Jones, were ensnared for lying to grand jurors, federal investigators or the court. Others, including Bonds' personal trainer Greg Anderson, pleaded guilty to steroid distribution charges.

Bonds was one of two former baseball superstars to stand trial in doping-related cases this year.

The trial of pitcher Roger Clemens was halted after just two days in July because prosecutors used inadmissible evidence. U.S. District Judge Reggie Walton has set a new trial for April 17.

The Associated Press contributed to this report.