An officer with the Franklin Township (NJ) Police Department who reportedly overdosed on heroin while on duty in April has been fired.

According to the Bridgewater Courier News, former officer Matthey Ellery pleaded guilty to possession of heroin and driving while intoxicated, and has now been fired by his agency.

Ellery pleaded guilty as part of a plea agreement in which he will apply for admission into a five-year drug treatment program, with an alternative sentence in the range of three to five years in New Jersey State Prison if he fails to successfully complete the drug program.