A Pleasantville man was arrested Wednesday after he showed up to a court hearing with over 40 bags of heroin, police said.

Te'Mon Molley, 18, was slated to appear around 2:15 p.m. before a judge at the Township of Hamilton Municipal Court in Mays Landing.

Court officers detected a strong odor of marijuana coming from Molley and two others he was with, police said. An investigation, unrelated to Molley's original court matter, revealed he was in possession of 43 bags of heroin and over $400 in cash.

Molley was charged with possession of heroin and possession of heroin with the intent to distribute. He was jailed Thursday at the Atlantic County Justice Facility on $15,000 cash bail.

Police said Molley's two accomplices were released with no charges.