The man, who was in Copenhagen's alternative enclave of Christiania, got into a police car after mistaking it for a taxi.
He was searched by police who found him to be carrying 1,000 joints, Copenhagen Police wrote on Twitter on Thursday.
“Last night a cannabis dealer from Christiania who wanted to get home quickly got into a taxi. He received a big surprise when he realised it was actually a police car he was sitting in,” police wrote.
“The police officers were happy to see him, since he was carrying around 1,000 joints,” the tweet continued.
I går nat ville en hashhandler fra Christiania hurtigt hjem og han satte sig i en taxa. Overraskelsen var stor, da han opdagede, at det var en politibil han var steget ind i. Betjentene var glade for at se ham, da han havde ca. 1.000 joints på sig. Han slap med en bøde #politidk— Københavns Politi (@KobenhavnPoliti) December 21, 2017
Police presence around Christiania has been prominent of late, with several raids and drones used in a clampdown on narcotics dealing in the area. A raid on Thursday resulted in a number of traders' stands being demolished and several kilos of cannabis confiscated, according to the police Twitter account.
Regular raids are conducted by police in an effort to restrict the cannabis trade in the alternative enclave, which was originally established by hippie squatters in 1971.
Copenhagen Police tweeted a second time over the incident later on Thursday to note that the man could face a custodial sentence for the offence. The initial tweet had stated he would be fined.