Ahsan Iqbal (pictured) was arrested as part of an investigation into a drugs line selling crack cocaine and heroin in Harlow.
On 2 September officers were on patrol in the Berecroft area and suspected drug dealing at one particular address.
They monitored activity and saw Iqbal and his co-defendant, Edvaldo Gabriel, leaving in a taxi.
Officers stopped the car and arrested the men on suspicion of drugs offences.
Iqbal had a mobile phone containing messages relating to drugs supply, which he said belonged to Gabriel.
In custody, Iqbal was searched and found to have 35 to 40 wraps of crack cocaine and heroin.
The 26-year-old admitted one count of possessing class A drugs with intent to supply when he appeared at Chelmsford Crown Court on 6 October.
Iqbal, of Stanmore Road, Leytonstone, was sentenced on 26 November to four years in prison.
Gabriel, 24, of no fixed address, admitted two counts of being concerned in supplying class A drugs when he appeared at Chelmsford Crown Court on 6 October.
He was sentenced to four years in prison on 20 October and ordered to forfeit £368.92 in cash.