BARNSTABLE — A Hyannis man pleaded not guilty Friday in Barnstable District Court to charges of trafficking 174 grams of fentanyl and trafficking 24 grams of cocaine, according to court documents.

Jonathan Cotell, 27, was held on a $50,000 bail, according to court documents.

Since October, members of the Barnstable police narcotics unit and the Cape Cod office of the Drug Enforcement Agency have been conducting a drug distribution investigation targeting Cotell, according a statement from Barnstable police.

During the investigation, detectives learned that Cotell was making weekly trips to Lawrence to purchase hundreds of grams of heroin and fentanyl at wholesale prices to later sell on the Cape, the statement said.

On Thursday, Cotell was followed from the Cape to Lawrence and back, the release said. Upon returning to Hyannis shortly before 1 a.m., a motor vehicle stop was conducted on Route 132. Discovered inside the vehicle operated by Cotell was $35,000 worth of fentanyl and cocaine, according to the statement.

Cotell was free on bail for a 2018 case where he was charged with assault and battery on a police officer, disorderly conduct and resisting arrest, according to records.

Cotell is due in court for a probable cause hearing Jan. 8.