(CNN) -- A federal appeals court has upheld an obstruction of justice conviction against Barry Bonds, according to court documents released Friday. The court ruled that the evasiveness of the testimony the former baseball star gave to a grand jury investigating sales of performance-enhancing drugs was sufficient to convict him.
In an opinion filed by the U.S. Ninth Circuit Court of Appeals, Judge Mary M. Schroeder said the three-judge panel rejected Bonds' contention that he could only have been indicted for obstruction if his testimony had been flatly false. Attorneys for Bonds had argued that Bonds' statements to the grand jury were factually true, and that language in the federal statute under which he was charged is unconstitutionally vague.
The appeals court rejected that argument.
"When factually true statements are misleading or evasive, they can prevent the grand jury from obtaining truthful and responsive answers," Schroeder wrote. "They may therefore obstruct and impede the administration of justice within the meaning of the federal criminal statute."
Bonds' testimony in December 2003 was part of an investigation that targeted his personal trainer, Greg Anderson, and employees of the California drug testing laboratory known as the Bay Area Laboratory Co-operative, or BALCO.
The testimony that led to Bonds' conviction came when a grand jury prosecutor asked Bonds whether Anderson ever gave him "anything that required a syringe to inject yourself with."
Bonds told the grand jury that only his personal doctors "ever touch me," and he then veered off the subject to say he never talked baseball with Anderson.
A jury in U.S. district court convicted Bonds on the obstruction count in April 2011. A mistrial was declared on three perjury counts of perjury after jurors reported they couldn't reach an agreement. Prosecutors declined to retry Bonds on the perjury charges.
He was sentenced to two years' probation and 30 days of house arrest.
The seven-time National League MVP, now 49, set baseball's all-time home run record in 2007. The San Francisco Giants did not renew his contract after that season and though he never officially retired, he has not played since.