A Hyannis man pleaded not guilty in Barnstable District Court Wednesday to cocaine trafficking after a state police trooper conducting a traffic stop found 29 grams of the drug hidden in his pants, according to court documents.

Joel Antoni Williamson, 36, also faces charges of unlicensed operation of a motor vehicle, a marked lanes violation and speeding, the documents say. He’s being held at the Barnstable County Correctional Facility on $10,000 bail.

State Trooper Edward Alldredge stopped Williamson’s car on Route 6 eastbound at about 12:45 p.m. Wednesday after he clocked him driving 67 mph in a 55 mph zone, and saw his car drift over the road’s white fog line, according to a report written by Alldredge.

When Alldredge returned to his cruiser to perform a background check, he saw Williamson sink his body lower in his seat until he could no longer be seen, and saw the car shake lightly as if Williamson was moving around inside, the report says.

Alldredge ordered Williamson out of the car and frisked him, and found a bag containing 29 grams of a white rocky substance suspected to be cocaine hidden between Williamson’s legs, according to the report.

Williamson, who has a record that includes violent offenses, drug convictions and is currently on probation for a 2018 assault and battery conviction, was arrested and taken to the Yarmouth Police Department.

He’s due back in court Dec. 17 for a pretrial hearing.