The man was enjoying a carefree night on the town at a pub on Södermalm when he struck up a conversation with a fellow reveler.
Finding himself in good spirits and apparently overcome with pre-Easter holiday generosity, the man invited his newly-minted acquaintance to follow him to the toilet to "do a line", according to the Aftonbladet newspaper.
What the man didn't realize was that his new best friend was actually an off-duty police officer who, while pretending to accept the offer, alerted on-duty colleagues about the cocaine proposal.
"They arrived at the bar quickly – they may have already been in the area – and arrested the man and confiscated the cocaine," duty officer Viktor Adolphson of the Södermalm police told the Dagens Nyheter (DN) newspaper.
A subsequent search of the man's flat uncovered more of the drug.
The man is being held for possession of narcotics with intent to distribute.
Speaking with Aftonbladet, Adolphson explained why the man's arrest, while somewhat ironic, is nevertheless cause for concern.
"This time he offered drugs to a cop, but what's alarming is that this surely happens to others and that many, perhaps, when they are a bit tipsy, decide to try it for fun," he told the paper.