NEWPORT BEACH, Calif. (AP) - A man who attacked his pet macaw, breaking its beak and leg, must complete 120 days of community service and take anger management classes, a judge ruled Friday.

Anthony James Ellis, 53, had been sentenced to 120 days in jail but Orange County Superior Court Judge Susanne Shaw said she would allow him to complete the sentence as community service.

Shaw also ruled that Ellis must pay $3,577.26 US in restitution for surgery and care of the bird and cannot have pets or consume alcohol during three years of probation.

Ellis was convicted April 27 of felony animal cruelty and abuse of an animal.

Witnesses testified that Ellis punched the bird - named "Johnny" - and slammed its head against the deck of his boat outside the Newport Harbor Elks Lodge, where the parrot was the mascot.