Cocaine was found in the boot of a car pulled over by police on the edge of Carlisle.
Charlie Harrington, 22, was the passenger in the vehicle stopped at Newbiggin Road, Durdar, on the night of December 28 last year.
Carlisle Crown Court heard he immediately handed over a packet of cannabis from his underwear.
Officers, who had noted an "overpowering" smell of the class B drug coming from the vehicle, seized more bags from the boot.
They also recovered an aftershave tin - bearing Harrington's fingerprints - which contained high purity cocaine potentially worth up to £2,300.
In addition, a bulking agent, weighing scales and plastic bags were found, along with a drug-related mobile phone text.
Harrington, of Crow Lane West, Newton-le-Willows, admitted possessing both cocaine and cannabis with intent to supply.
Judge Peter Davies, who heard the defendant had a previous class A drugs peddling conviction on his record, jailed him for three years.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here