SAN FRANCISCO — Barry Bonds will remain free and unpunished while he appeals his conviction for giving misleading testimony before a grand jury.

A federal judge handed Bonds a sentence of 30 days of house arrest, two years of probation and 250 hours of community service on Friday — then delayed the sentence pending an appeal likely to take a year or more.

U.S. District Judge Susan Illston also fined Bonds $4,000 for his obstruction of justice conviction arising from his grand jury appearance eight years ago.

Prosecutors wanted the home run king to spend 15 months in prison.