Published: Jul 06, 2011 7:15 PM EDT
Updated: Jul 06, 2011 6:16 PM EDT

BUFFALO, N.Y. (AP) - ESPN analyst and former NHL player Matthew Barnaby will have to complete 500 hours of community service to have charges dropped stemming from an argument he had with his estranged wife in May.

A court clerk says State Supreme court Justice Deborah Haendiges issued the order during a hearing in Buffalo on Wednesday.

The 38-year-old Barnaby pleaded not guilty to five charges after being arrested on May 13 at his suburban Buffalo home where his wife and two children live. As part of a plea agreement, misdemeanor charges of criminal mischief and aggravated harassment will be dropped if Barnaby fulfills the order within a year.

Barnaby spent 13-plus seasons in the NHL before retiring in 2007. He joined ESPN as an analyst a year later.

(Copyright 2011 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)