Mark Major, 40, was arrested by officers on March 12 after being observed selling drugs outside his Waverley Road home.
The flat – which Major shared with his girlfriend – was being ‘cuckooed’ by a 17-year-old drug dealer from London who was ordering him around, a court heard.
He pleaded guilty to two counts of being concerned in the supply of Class A drugs and appeared at Portsmouth Crown Court for sentencing.
Prosecutor Dan Sawyer said: ‘This case arises out of the police observing a number of known users of Class A drugs hanging around near Waverley Road
‘Police watched a number of them and Major was seen to walk over to them and the usual kind of activity that signifies a drug sale took place.’
Officers arrested Major and he led them to his flat, telling them that there was a young man there.
‘They shoved their way in and arrested him as well. A quantity of drugs – about 100 wraps of Class A – was found on that man.’
The drugs in question were heroin and crack cocaine, the prosecution confirmed.
Major did not have any drugs in his possession himself when he was arrested, the court heard.
Major’s girlfriend, herself a Class A drug user, had arranged for the 17-year-old to come down from London and the pair were being paid in drugs by the boy, the court heard.
Defence barrister Bridget O’Hagan said: ‘His whole life has fallen apart as a result of his involvement with this lady. At the moment he is blinded by love.
‘He wants to support her and he wants to help her but unfortunately he is being dragged down into the spiral that she has created.’
She asked that he be given credit for his guilty plea and lack of previous convictions.
Judge Roger Hetherington said: ‘This was an obvious case where your premises where you rented a flat have been cuckooed by a young person who was down with the drugs supply from London.
‘The reason – I have no doubt – you committed this offence is because of this relationship with your partner who herself is a Class A user.’
Major was given a two-year prison sentence, suspended for two years.
He must complete 100 hours of unpaid work and attend 15 rehabilitation sessions.