Simon Keith dialed 999 to say he was being followed in Wakefield city centre, but attacked officers when they turned up to help him.
Prosecuting the case at Leeds Crown Court this week, Lucy Brown said that police had responded to a call in the early hours of September 28 last year to a man on Northgate.
Having found Keith, they became increasingly concerned by his erratic behaviour and offered him re-assurance and to take him home.
When he became confrontational, he elbowed one of the two officers in the chest as they struggled to restrain him.
It was later found that the officer’s tendon had been ripped from his chest muscle and he required surgery and months of rehabilitation.
Keith also injured the finger of a female officer who had arrived as back up as they tried to get him into the back of a police van.
Mitigating for 27-year-old Keith, Christopher Morton said his client was an occasional cocaine user but was not addicted and had not used it since.
He said he had struggled to sleep that night and so went for a walk to “clear his head”.
He said of the struggle with the officers: “It was not premeditated and he did not intend to cause any injury.”
Keith, of Back Hambleton Street, Wakefield, admitted a charge of GBH and assault.
Judge Robin Mairs said: “You had taken alcohol and probably cocaine and officers were concerned for your safety.
“They reassured you and dealt with you politely, calmly and with respect.
“There’s no question this crosses the custody threshold, but I have decided that just, and only just, that I can spare you from prison.”
He gave him a 20-month jail term, suspended for 18 months, with 150 hours of unpaid work to be completed.