A drug addict assaulted two police officers called to break up his fighting in Huddersfield town centre.
Joshua Regan spat at one Pc and kicked the other, leaving him with a footprint mark on his bicep.
The 25-year-old pleaded guilty to being drunk and disorderly in public and two charges of assaulting a constable in the execution of his duty.
Kirklees magistrates heard that town centre CCTV operators alerted police to an ongoing incident on John William Street late on May 24.
They found Regan involved in a scuffle and being restrained by another man.
Regan swore at the officers and exhibited classic signs of drunken behaviour so they decided to arrest him, prosecutor Alex Bozman said.
He told magistrates: “He was unsteady on his feet and slurring his speech as he shouted abuse at them.
“As he was arrested he spat at one of the officers, hitting him in the chest, and kicked at another officer.
“This left a foot mark on his left bicep and Regan continued to struggle and kick out, although without making any further contact.”
Regan, of Carr Lane in Slaithwaite, tested positive for the misuse of cocaine and opiates upon his arrest.
He also admitted to thefts of legs of lamb and two bottles of vodka totalling £67 from Sainsbury’s in Market Place between June 2 and 7.
He asked magistrates to take into account further thefts of goods from Birchencliffe Filling Station and the Co-op in Mirfield.
Regan appeared at the Huddersfield court in custody after failing to show up for a previous hearing when he was expected to be sentenced.
His solicitor Rachel Sharpe explained that he suffered from mental health difficulties and been addicted to drugs “as long as he can remember.”
She added: “The defendant doesn’t remember much about the offences but wasn’t in a position to question the officers.
“He has a history of failing to surrender to court and finds it difficult to be in the right place at the right time, doing what’s expected of him.”
Magistrates jailed Regan for a total of 20 weeks.
He must pay £115 victim surcharge upon his release from custody.