A Dunfermline man caused an estimated £10,000-worth of damage to a supermarket window.

In the dock at Dunfermline Sheriff Court was 28-year-old Gavin Miller, of Haig Crescent.

He admitted that on August 19 at Aldi, Ferrard Road, Kirkcaldy, he maliciously and repeatedly threw a brick at a window, damaging it.

He also admitted that on September 28 at Carnegie Drive, Dunfermline, he engaged in a stand-up fight, shouted, swore, acted aggressively and made threats of violence.

He then resisted police officers, lashed out with his arms and legs and attempted to prevent the application of handcuffs.

Depute fiscal Andrew Brown said the estimated cost of damage for the window repairs was £10,000.

He told the court that at 3.15am a worker had heard loud banging from outside and then observed a male repeatedly throwing a brick at the supermarket window.

Police were contacted and found Miller standing outside the shop with the brick on the ground next to him. He told the officers voices in his head had been telling him to smash the window.

On the Dunfermline offences, he said that at 7.40pm police officers had been called to reports of a disturbance and “neighbours fighting in the street”. They arrived to find Miller and another man in the street engaged in a fight.

Miller tried to run away from the police shouting, “ya f****** dafties” but was quickly apprehended. After being arrested, Miller began struggling violently.

Defence solicitor Amy Harley had been taken street Valium and alcohol at the time, which had led to him losing his job, his relationship and his home.

“He was in a very bad place at the time,” she added.

For the Aldi offence Sheriff Garry Sutherland deferred sentence until August 7 to find more information on the cost of the damage.

For the Dunfermline incident, Miller was put on a community payback order with 12 months of supervision and a three-month restriction of liberty order