SALEM – A former Lynn man who police caught peddling heroin and firearms to an undercover officer in Lynn last year was sentenced to five years in state prison.Jessie Butler, 21, last known address of 242 Newbury St., Peabody, made his plea Wednesday afternoon in Salem Superior Court, confessing to charges of possession with the intent to distribute heroin, two counts of distribution of heroin as well as two counts of carrying a firearm without a license before Judge Timothy Q. Feeley.The judge agreed to adopt the joint recommended penalty requested by Assistant District Attorney John B. Brennan and defense attorney Thomas Pierce.The charges arise out of a series of drug deals and firearm sales to an undercover officer beginning on Aug. 19, 2010 when Butler admitted he sold six twists of heroin for $300 to an undercover officer in a parking lot near South Common Street.A week later on Aug. 24, negotiations were carried out at the same location where additional fingers of heroin were exchanged as well as a .45 caliber pistol and a .25 Beretta pistol for $850.Butler was arrested a week later on Sept. 9 on South Common Street by authorities who said they confiscated a quantity of heroin from his person along with an undisclosed amount of cash.Authorities believe that Butler was operating the Lynn-based heroin ring for his supplier, Joseph Marino, who at the time was reportedly in prison.In asking the judge to accept the recommendation, Brennan said it was appropriate while noting that Butler has no prior record and was just the distributor in the case.The judge credited Butler the 365 days he has spent in jail awaiting trial on the case.Marino, who also has been charged in connection with the case, remains held at the Middleton Jail awaiting trial on the case and maintains his innocence.