(CNN) Alec Baldwin pleaded guilty Wednesday to a violation of harassment in connection with a dispute last year over a parking spot, according to a Manhattan district attorney's office spokeswoman.

The actor pleaded guilty to a violation of harassment in the second degree with a conditional discharge and participation in a short-term anger management program, said Emily Tuttle, deputy director of communications for the district attorney's office. Under New York law, a violation is not a crime.

The actor will not serve time or be on probation, according to Tuttle.

There are court-imposed surcharges associated with any plea, Tuttle said. The cost was not immediately available.

CNN has reached out to Baldwin's attorney for comment