A drunken lout unleashed a torrent of racist abuse before jumping out of his bedroom window in a bid to escape police.
Drunken Stephen Hardstaff shouted: “F*** off back to your own country you P*ki b******,” at Sushil Saini.
He then threatened to kill him during the shocking incident at the Morrisons filling station at Largo Road, St Andrews.
Dundee Sheriff Court was told how Hardstaff randomly approached Mr Saini at 3.30pm after making the short walk from his home on Bobby Jones Place.
Police were later involved in a half-an-hour stand-off with Hardstaff, before he punched an officer in the face after leaping from his window in an ill-fated escape attempt.
A sheriff slated Hardstaff’s “disgusting” behaviour and said his actions merited a jail term.
“You have racially abused a member of the public who, as far as I can tell, was minding their own business,” Sheriff Alastair Carmichael told him.
“It is simply unacceptable and disgusting.”
Prosecutor Christine Allan said Hardstaff was so close to Mr Saini that spit was landing on his face.
Mrs Allan said: “The accused was repeatedly shouting and swearing and also threatened to kill the witness.
“The witnesses shouted for help after he (Hardstaff) continued in this manner.
“Security started to approach and the accused walked off.
“One of the party was too scared to leave the vehicle due to the accused’s actions.”
Police later saw Hardstaff at a window in his home but he refused to come out and speak with the officers.
“Eventually, he jumped from his bedroom window to the grass below and attempted to flee,” Mrs Allan said.
“PC Alan Tait attempted to apprehend the accused but he punched him to the head and started kicking him to the legs before being restrained.”
Hardstaff, 49, pled guilty to committing the offences on October 4.
Solicitor Ross Donnelly said Hardstaff’s behaviour was triggered by his addiction to alcohol.
Mr Donnelly told the court: “Clearly that is something that has impacted on his behaviour and the people he is interacting with.”
Hardstaff was placed on a restriction of liberty order for 16 weeks which will keep him indoors between 7pm and 7am.
He was also made subject to supervision for 18 months with a requirement to receive alcohol counselling.
The orders were made as an alternative to a custodial sentence.