Sean Penn Ordered to Anger Management

Sean Penn will have to be on his best behavior for the next three years.

The Oscar-winning actor pleaded no contest Wednesday to misdemeanor vandalism stemming from a tussle with paparazzi last year. Penn, who was not present, entered the plea through his attorney in a Los Angeles court.

Penn, 49, was sentenced to three years probation and 36 hours of anger management sessions as part of a plea deal with prosecutors. One count of battery was dropped. Any brushes with the law during his probation term could potentially send him in jail.

"Prolonging this matter in the court system would not have been in Mr. Penn's best interest and would've distracted from his charitable commitments, specifically his work with the J/P Haitian Relief Organization," his lawyer Richard Hirsch tells PEOPLE. "Accordingly he has decided to accept the plea terms and move on."

The actor was charged with battery and vandalism for an Oct. 12 scuffle on a residential street in Brentwood, Calif. Video showed a visibly upset Penn walking quickly toward a photographer, telling him to "Get out! Get the [expletive] out!" He then was seen repeatedly attempting to kick the man.

Prosecutors alleged that the photographer's camera was damaged and that he was physically battered.

The actor was also ordered to perform 300 hours of community service, which can be carried out through an organization he created for Haiti earthquake victims, an L.A. city attorney spokesman said. The actor is currently in Haiti.