A man who punched a woman in the face and threatened police officers has dodged a jail term.

William Leiper assaulted the woman outside her home in Auchenleck and behaved in a threatening and abusive manner on July 2. At the time of the offences, the 28-year-old was on bail.

Leiper, of Glasgow, pled guilty to three charges at Ayr Sheriff Court last week.

Procurator Fiscal Jason Bell told the court that one of the complainers was in her home address when the other complainer returned with Leiper. Both were drinking alcohol.

At around 10.40pm, Leiper became aggressive and began shouting at one of the women, asking her to leave the house.

The woman replied that it was her house and Leiper became more aggressive. She then left the building because, said the fiscal, “she didn’t want to get involved”.

Mr Bell added that the second witness also left the house “because she was concerned about” Leiper’s behaviour.

Leiper followed one of the women, behaving in an aggressive manner and shouting and swearing. He then approached the other woman and punched her to the face.

Police were contacted and when they arrived, the women told them that one of them had been assaulted.

The police took hold of Leiper, but he continued to behave aggressively, shouting: “See you, you f*****’ b*****d. I’ll f*****’ kill you, I’ll find you.”

Officers tried to calm Leiper without success. He behaved in an aggressive manner towards them, shouted and swore, uttered threatening remarks and clenched his fists.

Leiper was put in the back of a police van where he continued to shout and swear and act aggressively on the way to Ayr Police Station.

He appeared at court the following day and was remanded in custody but was released on bail on July 18.

The woman Leiper assaulted suffered a sore head but did not require treatment.

Leiper’s solicitor Mr Gallagher said that his client had suffered several bereavements recently.

The solicitor added: “He came to Ayr to meet with friends. He was out for drinks and everything was fine.

“He tells me: ‘I totally blacked out and don’t recall anything’. He appears to be genuinely remorseful and ashamed of himself.

“He has gone to his doctor and advised that he has a drink issue..”

Sheriff Mhairi McTaggart warned Leiper: “You know, with that kind of offending you may well expect a custodial sentence. If you’re taking alcohol to the extent that you black out and can’t remember what happened, that is very serious and something that needs to be addressed.”

Sheriff McTaggart sentenced Leiper to a Community Payback Order with 18 months supervision as a direct alternative to custody. She also ordered him to carry out 130 hours of unpaid work.