A man who was caught with heroin he was going to supply has been spared jail after a court head how he had got off drugs.

Ajmol Ali, known to friends as Danny, had managed to get work and start a family in the three years it took for his case to finally be resolved.

Jeremy Wright, prosecuting, told Swindon Crown Court that the 38-year-old was in a car which was stopped by police on Thursday, January 26, 2012.

When he and the vehicle were searched officers found five wraps of heroin, weighing six-and-a-half grams, in his sock and more drugs were found in the car.

Ali, of William Street, Calne, initially pleaded not guilty to possessing heroin with intent to supply and admitted possessing cocaine.

The case was finally due for trial in November last year when he changed his plea after being told he would get a suspended sentence.

He was spared jail in 2010 after admitting two counts of possessing class-A drugs with intent to supply.

Marcus Davey, defending, said he accepted that the heroin offence was so serious a jail term had to be imposed.

"The offences are clearly very old. Ajmol Ali is now a very different person three years on," he said.

"He has gone from being heavily involved in drugs not only consuming them but supplying them to others to looking healthy and being the father of two young children."

He said he had not only been out of trouble since then but the police had confirmed there was no intelligence linking him to the drugs scene.

Recorder Maria Lamb said: "You are 38 years old and you have got a pretty bad record as far as drugs are concerned and on January 26, 2012, you were back in trouble with drugs yet again.

"There is no doubt, as your counsel has candidly accepted, that the seriousness of the involvement that you have in drugs passes the custody threshold.

"That means it has to be a prison sentence however I am going to suspend that prison sentence.

"Fortunately for you whatever has happened in your past you have managed to put behind you."

Imposing an 18-month jail term, suspended for two years with 200 hours of unpaid work, she said: "You know, with your history, the sort of pernicious evil that drugs represent."