More than 50 people had to be evacuated from the Cross Tavern in Whitburn when a canister of the invisible gas was set off just before closing time.
Frightened drinkers complained of feeling burning in the back of their throats and their eyes swelling up as the gas – which is used by the police as a last resort to tackle violent offenders – took effect.
They rushed out on to the town's main street where gala day celebrations had been held earlier that day as police and ambulance services rushed to the scene.
Manager Helen Morton said they had been left stunned by the apparently motiveless attack, which happened after a busy Saturday night.
She said: "It was very strange to be honest. We've no idea how it got in the pub.
"It was quietening down for the night but there were still about 50 people here. People said they could feel it at the back of their throats and we evacuated everyone outside.
"You couldn't see anything, there was no smoke, but there was a burning sensation in the back of my throat and nostrils and my eyes were watering. It was really frightening.
"I've never heard of anyone carrying CS gas and I've no idea where you would get it."
It is not known whether the canister was thrown into the pub or let off from the inside. Police are now examining CCTV for clues, as well as attempting to discover where the weapon came from in the first place.
CS gas is classed as a firearm and is illegal to possess but can be bought abroad as well as over the internet. While it is issued to Lothian and Borders officers, it is only rarely used to subdue suspects in dangerous situations.
After the gas had cleared, many drinkers returned to the pub but the bar was again evacuated by police as a precaution. In the end no-one required treatment by paramedics.
A police spokesman said: "Police responded to an address in East Main Street, Whitburn, at around 12:45am on Sunday, 27 June following reports of a noxious substance being released from a canister within the premises.
"Inquiries are now ongoing to determine the circumstances surrounding the substance release and how the cannister came to be within the premises.
"We are appealing for anyone who may have any information to come forward."