A THUG attacked an off-duty police officer on his stag night in York because he was Scottish, York Crown Court heard.

Alex David Kenneth Ogden, 20, approached David Stupart and his friend Gary Dewar when they were walking along Micklegate on their way back to a hotel after a night out on July 8 this year.

Ogden, of no fixed address, shouted racist abuse and then hit Mr Stupart with a "fearsome" punch.

Mr Stupart is an Edinburgh-based constable for Police Scotland.

After he was arrested, Ogden also assaulted an officer at a police station.

Eleanor Fry, prosecuting, told York Crown Court on Tuesday: "The two men had been drinking all day. They were heading back to the hotel and walking down Micklegate.

"They heard someone shouting at them. Something about immigrants and "**** off home, **** off back to Scotland."

She said Ogden, who had also been drinking, punched Mr Stupart in the face and then took off his belt and "used it as a weapon", hitting the off duty officer.

The "sustained and repeated assault" only ended when Mr Dewar intervened, she added.

While at the police station, Ogden acted like a "wild animal", according to Recorder of York Judge Paul Batty QC.

Ogden kicked a police officer and a "spit hood" was put on his head to stop him spitting at officers.

Spit hoods are placed over prisoners' mouths to prevent them from spitting at law enforcement officers, but their use has been highly controversial and the Metropolitan Police last week announced it was shelving a trial of them, following objections from human rights campaigners.

In Ogden's defence, Neal Kutte said: "He is only 20-years-old. His longest previous sentence was 20 weeks.

"The defendant apologises publicly about these offences. He is not proud of them at all.

"He was drunk during these offences. He would like to make a fresh start upon release."

Ogden pleaded guilty to the charges of racially aggravated assault occasioning actual bodily harm, common assault, assaulting a constable and failing to surrender to custody.

Judge Batty told Ogden: "For one so young you have amassed a significant criminal record, with 20 previous appearances.

"You attacked him Mr Stupart simply because he had a Scottish accent. If that wasn't bad enough while at the police station you kicked backwards towards a police officer. Such was the conduct at the police station the police were forced to put a spitting hood over your head. You were acting like a wild animal."

He added: "I acknowledge you are only 20, which has to be factored into the sentencing exercise. But against that you have an appalling criminal record and this was an appalling offence."

Ogden has been sentenced to two years and nine months in a young offender institution.

He also has to pay a victim surcharge of £170.