Drinkers in Cheltenham were being stopped and tested for drugs on Wednesday night. Operation Return was aimed at identifying and arresting dealers and users in the town.
Fifteen police officers were stationed outside various pubs, taking sweat samples from customers.
The test involves wiping paper over a person's palm and passing it through a machine which can detect the slightest trace of drugs.
Pub-goers who refused to be checked were denied entry and searched.
Plain clothes officers were also monitoring queues for suspected offenders.
Pc Joe Ineson, from Cheltenham police, said: "We hope that this operation will send a clear message to drug dealers and users that we will not tolerate this type of behaviour."