A man arrested on suspicion of assault resisted police officers as they tried to remove him from the bail hostel where he was living.
Blackburn Magistrates' Court heard Martin Matthews threatened to "kick off" with the officers and then tried to trip one up before being taken to the ground onto some dog poo.
Matthews, 42, of Howarth House bail hostel, St Peter Street, Blackburn, pleaded guilty to resisting arrest.
He was jailed for 14 days after the court heard he had been recalled to prison for 14 days for breach of prison licence.
Scott Parker, prosecuting, said police were called to the hostel at 8.15pm to investigate a report of an assault.
The defendant was cautioned and arrested, but immediately became resistant.
"He kicked out at an officer and tried to trip him up," said Mr Parker.
"He was told to stop resisting, but, despite being in handcuffs, he threatened to kick off with the officer."
Mark Williams, mitigating, said his client was not overly impressed with the way police handled the matter.
"He was in the toilet when he was confronted and put in handcuffs," said Mr Williams.
"He was then frog-marched down the corridor, and at one stage the officer took hold of him around the neck and took him to the floor.
"He was picked up and taken outside, where he was again taken to the floor, this time
into some dog dirt. He was then pepper-sprayed for his trouble.
"He accepts the way he reacted wasn't what it would have been if he had been sober," said Mr Williams.
Share