Marvin Mhlanga, 19, told officers who charged him with supplying heroin to their undercover colleagues that he had never been happier because his arrest meant he would no longer be under pressure from a drugs gang.
Cardiff Crown Court heard his joy was the relief he felt in no longer being forced to peddle the class A drug in the city.
As he was jailed for three years, defence barrister Andrew Jones said: He had been asked to hold on to a package which he lost and after that had to work off the debt.
He is too frightened to name others involved.
Mhlanga, the son of a Zimbabwean asylum seeker and political activist who was said to have been murdered, was waiting to take up a business studies course at Coleg Glan Hafran when he was arrested.
The court heard how, during the drugs operation, he supplied heroin to an undercover police officer on four occasions.
During one of those meetings, others with Mhlanga became suspicious of the customer they knew only as Dave and thought he may have been with the police.
But Dave allowed himself to be searched, was allowed to go on his way and to arrange further meetings.
The teenager was eventually arrested at home in Lady Margaret Terrace, Roath.
Mr Jones said: Its right that he told them Ive never been happier he was relieved when he was caught.
He left school with nine GCSEs and had a life full of promise in front of him until he fell in with the wrong crowd.
It was that bad company which was said to have led to Mhlnaga being part of a street robbery in 2007.
On that occasion a group followed a youth into lane in Penarth, took his belongings and left him with two black eyes and a fractured jaw.
Giving him three years in a young offenders institution, Judge David Wynn Morgan told him: Fortunately you yourself are not addicted you were doing it because you got into trouble and you were being used by people who had some hold over you.
But these are despicable crimes and there must be a lengthy sentence.”Post published in: Africa News