Daniel Davies, 25, was under surveillance when he sold cocaine outside licensed premises in Aberdeen last May.
The High Court in Glasgow heard that Davies, a Liverpudlian who had moved to Aberdeen in 2010, was one of several people being watched by Grampian Police officers.
He arrested on 10 May last year after being seen getting out of a Volvo car with a heavy suitcase, the contents of which were transferred to the boot of a Mercedes, which he drove off. When stopped, officers searched the boot and found a package containing 120 blocks of cannabis resin with a street value of £86,400.
Davies, whose address was given as Berwick Drive, Liverpool, admitted being concerned in the supply of cocaine and cannabis resin.