Along with the gun went ammunition, a 40,000 baht Apple computer notebook and other items, Colonel Paisan Sangtep said yesterday.
He raised the alarm when he returned to his desk about 2am. The word spread quickly.
A motorcycle taxi rider told officers he'd picked up a young man carrying a gun outside the Patong station.
All-night tuk-tuk drivers chatted about the theft and the man was arrested outside the Banthai Resort on Patong's beach road.
Banpot Sritna, 24, a housepainter from Trang, told police he was high on 10 ya bah tablets and had stolen the items to sell to support his drug habit.
He had just wandered into the police station off the street and made the most of the opportunity when the colonel went to the toilet.