HAMILTON TOWNSHIP — Police found 43 bags of heroin on a Pleasantville man while he was in municipal court for a separate incident Wednesday, authorities said.

Officers in the courtroom detected “a strong odor of marijuana” coming from 18-year-old Te’Mon Molley and two others, police said. A subsequent investigation, unrelated to Molley’s original court matter, was conducted by the officers, who said they found Molley to be in possession of 43 bags of heroin.

Police seized the drugs and $400 cash in his possession, and charged Molley with possession of heroin and possession of heroin with the intent to distribute. He was in the Atlantic County Justice Facility on $15,000 cash bail, police said. The two others were released with no charges.