A delivery driver who “lost it” and threatened to kill a police officer when he was pulled over in Bradford had escaped jail by the skin of his teeth, the judge sentencing him said.

Asim Hussain accused the police of racism and said: “I swear you’re a dead man,” when he was handcuffed and put into the back of a patrol car after refusing to provide his details and grabbing an officer’s arm.

Hussain, 31, of Princeville Street, Lidget Green, Bradford, pleaded guilty to making a threat to kill, threatening behaviour and causing harassment, alarm and distress in what Judge Ahmed Nadim labelled a “disgraceful” incident.

Prosecutor David Ward told Bradford Crown Court that two police officers in a marked patrol car pulled Hussain over at 2am on June 16 to check that he was insured to drive the vehicle.

Hussain was aggressive and obstructive, demanding to know why he had been stopped. When the officers tried to explain, he kept talking over them.

He grabbed an officer’s arm when he went to turn the car engine off and made threats when he was handcuffed.

Hussain shouted: “I swear you’re a dead man,” and said he would murder an officer.

Mr Ward said his aggression and threats were unnecessary because he was driving perfectly legally.

“None of it needed to have happened,” he said.

Hussain had six previous convictions for 13 driving offences, including driving while disqualified on four occasions.

Nathan Davis said in mitigation that he had been out of trouble since 2018 and it was “mere senseless rhetoric.” Hussain had no intention of carrying out the threats.

He “lost it” while handcuffed in the back of the patrol vehicle.

Hussain had not taken his medication for mental health problems and “lashed out verbally,” Mr Davis told the court.

“It was the bravado of a man who has lost control emotionally,” he added.

Judge Nadim said: “The police were trying to do their duty and all that was needed was a bit of civility from this defendant and what he embarked on was disgraceful.”

He told Hussain: “You obviously have a chip on your shoulder.

“Your reaction to that lawful, civil and proper command was disproportionate, offensive and aggressive.

“The police were entitled to conclude that you were capable of acting on the threats that you were making.”

But Hussain had made great strides to sort his life out since 2018 and had the support of his wife.

His utterly irrational behaviour may have been rooted in his mental health issues.

“You have avoided prison by the skin of your teeth,” Judge Nadim said.

Hussain was sentenced to eight months imprisonment, suspended for 18 months, with 160 hours of unpaid work.

He must attend the Thinking Skills course and 20 rehabilitation activity days.