Two men who carried out a horrific attack on a rape-accused man in the centre of Ayr after a confrontation in a nearby bar have avoided jail time.

Sean Goudie and Sean Connelly pleaded guilty to a charge of serious assault when they appeared at Ayr Sheriff Court, where CCTV footage of the shocking attack was played.

Even after the victim came to and tried to stand up, the pair kicked him in the head again, leaving him severely injured and permanently disfigured.

The duo avoided jail and the court heard the victim of the attack was himself facing an allegation of rape.

However they will have to pay £1,000 compensation to the accused man.

Fiscal depute Craig Wainwright previously told how the victim had left Harley’s Bar in nearby Nile Lane at 1.45am, but that Goudie and Connelly had followed him on to the High Street.

“Sean Goudie ran after him and pushed him to the upper body,” Mr Wainwright said.

“This caused him to step back onto the pavement.

"Sean Connelly then approached him from behind and punched him to the side of the head.

"This caused [the complainer] to fall to the ground, strike his head and lose consciousness. He lay unconscious as both stood over him.

"Sean Connelly kicked him to the rear of the head.

"Both accused walked away looking back while shouting and gesticulating, while Lee McQueen lay on the ground motionless. After 30 seconds he came to and rose to both knees.

"Both accused approached and both stood over the accused. Sean Connelly pointed in his face shouting at him, while a member of the public tried to pull Sean Goudie away.

"Despite efforts from the member of public, he gave a forceful kick to his head while still on his knees, causing him to fall to the ground.

"At this stage other members of the public approached and saw him bleeding heavily from the head.

"A bouncer from Harley's approached and Sean Goudie ran off from the locus. Police were made aware by CCTV operators and attended.

"Sean Goudie was arrested and Connelly was traced in a taxi in a nearby street, and taken to Kilmarnock police office.

"The complainer had no recollection of the incident and was conveyed to Ayr Hospital. He had one laceration wound to his temple.

"He was discharged the same day and in the opinion of the doctor the laceration will leave permanent scarring.”

The court heard Goudie was on a community payback order at the time of the incident.

Defence solicitor Tony Currie said: "This unfortunate incident occurred in a context the Crown is aware of, and both were given the benefit of bail from first appearance.

"The complainer at that time was subject to petition proceedings for an allegation of rape of [a woman known to] Mr Goudie.

“Unfortunately others including [the female complainer] were in Harley's Bar.

"I simply offer this as context and ask your Ladyship to continue bail."

Sheriff Shirley Foran agreed to allow both to remain at liberty and called for criminal justice social work reports ahead of sentencing.

Connelly, of Glenmuir Road, and Goudie, of Gould Street, return to court last week, Mr Currie said: “Both are quite clear this is a very serious matter my Lady will take a dim view of.

“Regardless of the background it is no excuse for the way they conducted themselves.  

"The complainer I think it's fair to say did not cover himself in glory, essentially goading this young lady.

"The CCTV really brought home what they had done and immediately provided appropriate instructions."

Sheriff Shirley Foran said: "Both of you I note are working men and family men with young children in your lives. Think on that video and how that would look to one of your children.

"It was disgraceful conduct and fortunate not facing a more serious charge.

"It's repeatedly said if you kick someone to the head you are a step away from a murder charge.

"The gravity against your background was such I had to consider prison, the conduct could easily justify that.

"The context gives me some insight, but not any excuse. I note your genuine remorse."

As well at the compensation order both men were placed on a community payback order with supervision for two years and will have to complete 300 hours of unpaid work.

The Crown Office and Procurator Fiscal Service declined requests from the Advertiser to release any stills of the CCTV used in the case, citing the ongoing live criminal matters against the complainer, which are due to call at the High Court later in the year.