A CARDIGAN-wearing drug dealer who sold heroin and crack to an undercover police officer has been given a 'last chance' by a judge.

Casey Goble was told he had come 'with a hair's breadth' of going to prison after being caught in an undercover sting.

The 41-year-old, who has a lengthy record, claimed he was put under pressure to sell the drugs after stealing from a gang.

Claire Marlow, prosecuting, told Swindon Crown Court how officers were targeting a supply network known as the DDNs in late 2013.

An undercover officers using the name Chez contacted a dealer asking for heroin and crack cocaine and was told to go to Elmina Road.

"He was then seen by a man seen as being in a cardigan and told to go into an alleyway," Miss Marlow said.

"The man then spat out two plastic wrappings from his mouth, handed them over, and in turn was handed two £10 notes."

A week later the officer made contact again and met the same man, still wearing a cardigan, and bought some heroin.

When the defendant was arrested he told police that he had stolen £2,500 from a drug dealer and his associates and moved to Swindon to start a new life.

But he said the people he stole from found him and kicked down his door and threatened him with knives and a stun gun.

Although he had been offered help by the police he said he had turned it down and gave into pressure to deal for his attackers.

Goble, of County Road, pleaded guilty to three counts of supplying drugs.

The court heard he had a long history of crime and was jailed for three years in 2010 for a burglary in Cirencester.

Tony Bignall, defending, said in the past year or so his client had begun to get some stability in his life and keep out of trouble.

He said he suffered from deep vein thrombosis as a result of injecting drugs in the past but was now turning his life around.

"He is beginning to realise he is getting too old to be in trouble," he said.

Passing sentence Judge Peter Blair QC said: "You have come in front of me today within a hair's breadth of another long sentence.

"It was, I think, a three-year sentence for a burglary which you got in 2010 and here you are back in front of the courts this time for supplying an undercover police officer on two separate dates with class A drugs.

"You deserve, in terms of sentencing guidelines, a sentence between two and three years for what you did on these two dates in December 2013.

"There is plainly some coercion that led you to be running these drugs for a supplier and threats of violence.

"You also have some substantial health problems: I take in to account your letter to me which suggests, if you are to be believed, there are a number of family and accommodation elements to your life that are making things more stable together with your age and health, bringing home to you that this is an evil drug that is gradually destroying you and has destroyed another member of your family in the past.

"This will be your final chance."

He imposed a two-year jail term suspended for two years with supervision, a drug rehabilitation requirement, and a three-month night time curfew.