BRUNSWICK — A Massachusetts man has been arrested in Maine after police conducting a traffic stop allegedly found him in possession of up to $20,000 worth of cocaine.

Brunswick police, acting on a tip about a vehicle with Massachusetts plates driving erratically, stopped the vehicle just after 3 a.m. Wednesday.

The Times Record reports that the officer found 168 grams of cocaine taped to the inner thigh of the front-seat passenger.

Nineteen-year-old Hector Nieves-Martinez of New Bedford, Mass., was charged with aggravated trafficking of scheduled drugs. His bail was set at $25,000. It was not clear if he has a lawyer.

Police say the driver, 23-year-old Dana Santos of New Bedford, was charged with possession of a usable amount of marijuana and issued a summons.

A third occupant was not charged.