A hapless drug dealer's attempt to escape police descended into comedy after he managed to get his legs tangled in the frame of his bike.

Plain clothes officers spotted addict Jamie Lee McMaster taking part in a heroin deal in Stockton, on June 11.

The 26-year-old was seen holding a plastic bag at the window of a Rover car before he spotted the unmarked police car and tried pedal off.

But as the clumsy dealer turned his bike to flee his legs became entangled in the frame, said prosecutor Sam Faulks.

McMasters then tried to run away but was quickly caught and found to be holding 1.22g of heroin in 11 packages, Teesside Crown Court heard.

McMaster, of Alder Road, Stockton, was jailed for three years after he admitted possession of the class A drug with intent to supply - his first drugs conviction.

Duncan McReddie, defending, said McMaster was doing it to fund his own seven-year heroin addiction.

He said McMaster previously conquered a crack habit, worked and could get on with a normal life.

Mr McReddie suggested a suspended sentence or long community order with incentives for McMaster to stay off drugs and out of trouble as he now had a settled relationship and a child.

"The clang of the prison door can be avoided," he said.

Judge George Moorhouse told McMaster: "You know yourself, you read the newspapers, people who deal in drugs at a low level are commiting a very serious offence. You've seen the effect heroin has on people includingyourself, and therefore people have to be punished.

"You did sell to fund your addiction. You've got a settled relationship. You should have thought of that before you started selling drugs.

"You've also shown remorse. There are signs you are going to get yourself back on the road.

"I hope that while you are in prison you contemplate further about that."

There was crying in the public gallery as the judge jailed McMaster for three years.