A student caught with class A drugs who later admitted conspiring to sell them has been spared jail after evidence emerged that he had been coerced into getting involved.

Sentencing Isaac Enwerobi, 20, of Russell Road in Chingford, Judge John Dodd said there were “slightly unusual” circumstances in the case after Chelmsford Crown Court heard the 20-year-old had been the victim of a shooing in 2011 and his home had been shot at last year.

Enwerobi was stopped by police while driving in Harlow on January 24 and found to be in possession of one wrap of heroin.

He was taken to a police station, where a further 29 wraps of crack cocaine and 23 of heroin were discovered stuffed in his trousers.

He admitted he had been sent to Harlow to collect the drugs, which had been hidden under a bush, but he refused to name the person who sent him.

The prosecution accepted he was acting as a courier and said there was evidence to support Enwerobi's claim that he had been coerced into the role.

Enwerobi had no previous convictions and is studying business at college.

In mitigation, Enwerobi’s counsel, Claire Davies, said: "He is a young man who has done his best to stay away from these people.

"He denies ever having been in the gang but he seems to have been targeted to get involved.

"He doesn't want to and is standing firm against them. At the same time, he doesn't want to give names or evidence and you can perhaps understand that."

She added that in January he was "under threat, pressure and coercion".

Judge Dodd said: "It's a slightly unusual basis of plea so your prison sentence can be suspended but be under no illusions whatsoever had it not been for the generous and fair approach of the prosecution, and if you had been convicted at trial, you would be going to prison because what you entered into was criminality of a type which attracts a custodial sentence measured in years for an older man.

"You have substantial academic abilities. I sincerely hope for your sake and your family's that this is a real lesson today."

He was given a 12-month jail sentence, suspended for a year and ordered to carry out 150 hours unpaid work.