YORK magistrates decided against locking up a man who attacked his pregnant girlfriend, hurled racial abuse at a shopkeeper, assaulted two police officers and left a trail of damage in his wake.

Martin Townend, prosecuting, told them the mother-to-be struggled to breathe as Stuart Galloway grabbed and squeezed her throat for between 30 and 60 seconds.

Galloway called Sukhdev Aujla of Stop Gap shop in Gale Lane a racist name and smashed the shop window because the shopkeeper refused to sell him alcohol when he was drunk, before assaulting two police officers called to deal with him. Probation officers warned magistrates Galloway was highly likely to reoffend and the magistrates agreed his crimes merited a prison sentence.

But they gave him a community order because, they said, it was more important to stop him reoffending.

Galloway, 31, of Viking Road, Acomb, was ordered to do three years’ supervision, a rehabilitation course and 200 hours’ unpaid work and pay £400 compensation, the cost of the broken shop window to the shopkeeper, and £150 compensation to his girlfriend, the cost of replacing her car windows which he smashed, a £60 statutory surcharge and £85 prosecution costs.

He had pleaded guilty to two charges of criminal damage, one of assault, two of assaulting police officers and one of racial abuse.

Jane Maloney, mitigating, said Galloway had a job offer. He apologised for his crimes.

Mr Townened said the girlfriend wanted their relationship to continue.

On June 27, Galloway had been drinking at home when, during an argument, he grabbed his girlfriend’s throat. When he left after the attack, he went outside and smashed two of her car windows and pushed her. He went to the shop to buy more alcohol.

When police arrived, he struggled and hit both officers, but neither was injured.