Three of the four charges against Barry Bonds were dropped. (Noah Berger/AP)

A federal judge upheld the seven-time National League MVP’s conviction on an obstruction of justice count earlier this week, but Wednesday federal prosecutors dropped the remaining three charges against him. Those included the accusation that Bonds committed perjury — the charge Clemens faced in botched courtroom proceedings in July — by lying to a grand jury in 2003 about his alleged steroid use.

The U.S. attorney’s office in San Francisco dismissed the three charges which deadlocked a jury during Bonds’ trial in April. Prosecutors were 30 days away from the deadline to start the retrial process, but now Bonds cannot be retried on those counts.

In 2007 Bonds was charged with lying to the grand jury during a 2003 appearance in which he testified that his personal trainer, Greg Anderson, misled him into believing the steroids he was taking were legal supplements. The jury voted to acquit him on perjury charges but voted convincingly (11-1) to convict him for denying that he had never been injected by anyone other than his doctor — which makes the fact that they’ve now dropped that charge somewhat baffling.

Bonds could face a maximum of 10 years in prison on his obstruction of justice conviction, but a 15 to 21-month sentence seems more likely. He is scheduled to receive his sentence on Dec. 16.

Attorney William Keane, who represented track coach Trevor Graham — one of the other two individuals who pleaded not guilty to charges stemming from the BALCO probe — said he expects prosecutors will argue for prison time for Bonds but that the all-time home run leader likely will avoid it. Graham and cyclist Tammy Thomas each received house arrest sentences.

“Given that the core part of the case hung and given the other sentences in the BALCO cases,” Keane said, “Bonds has a reasonably good chance of avoiding prison time.”