BOSTON — A Boston police officer convicted of a racially motivated attack on an Uber driver has been sentenced to three years of probation.

As conditions of probation, Michael C. Doherty was ordered Tuesday to complete an anger management program, refrain from alcohol, and perform 100 hours of community service.

Prosecutors asked for jail time.

The 43-year-old Doherty was convicted April 2 of assault and battery and for using a racial epithet against the Latino driver.

Prosecutors say in the early morning hours of Jan. 4, 2015, the off-duty Doherty became angry when 28-year-old Luis Blanco brought him to the wrong location, then struck him and stole his vehicle.

Doherty’s attorney blamed her client’s alcohol abuse and said he expects to be fired after a 16-year career. He is currently suspended without pay.