An ex-'Opie and Anthony' producer pleaded guilty to harassing one of the radio show's co-hosts and his family for eight years.

Benjamin Sparks, 40, took a plea deal on Monday that ordered him to complete four days of community service instead of jail time for harassing Gregg 'Opie' Hughes with calls and text messages in September, according to the New York Post.

He copped to harassment as a violation and aside from agreeing to complete four days of community service, Sparks must stay away from Hughes.

Benjamin Sparks (left), 40, pleaded guilty to harassing co-host, Gregg 'Opie' Hughes (right in 2006) from the Opie and Anthony show, and his family for eight years

Sparks was arrested in October, a few weeks after he had allegedly sent Hughes more than 40 insulting text messages for two days beginning on September 18, according to court documents.

Hughes told the New York Daily News that Sparks had 'been harassing me and my family for eight or nine years'.

He told the newspaper that it had 'been more than just text messages'.

Hughes had repeatedly told Sparks to stop contacting him, according to the Daily News, but Sparks called Hughes a 'f—king law breaking piece of sh–t'.

Sparks also reportedly threatened Hughes with lawyers and said he was 'looking forward' to taking Hughes' money, adding that 'everyone' wanted to take Hughes down.

The ex-producer even named Hughes home address in th​​e messages, according to the Post.

The popular talk radio show was reportedly broken up after co-host Anthony Cumia was caught up in a racist tweet scandal.

Hughes now hosts the Sirius Satellite Radio show 'Opie with Jim Norton'.