An 18-year-old man was ordered today to complete animal cruelty classes and perform Caltrans service for killing a pet parrot last year at a Long Beach house where he had been staying.

Edward Cervantes was immediately sentenced by Superior Court Judge James D. Otto after pleading no contest to a felony animal cruelty count.

In addition to 48 animal cruelty classes and 30 days of Caltrans service, Cervantes was placed on five years probation and was ordered to pay $3,272 in restitution and to stay away from his former hosts.

18-Year-Old Charged After Allegedly Striking Man and Killing His Parrot

As a condition of probation, Cervantes must obtain a full-time job, be enrolled in school full-time or have part-time work while going to school, according to the Los Angeles County District Attorney’s Office.

Cervantes—who was staying at a home in the 1300 block of East Ocean Boulevard—killed the yellow-headed Amazon parrot after a heated exchange last December 26 with his hosts, said Deputy District Attorney Dan Novey.

He was arrested that evening by Long Beach police and has remained behind bars since then, but was released from custody this afternoon, jail records show.