A teenager turned up at a house in Dunfermline just before five in the morning, banging on a door before smashing the living room window.

Jordan Stewart (19), formerly of Dunfermline, but now living in Kirkcaldy, appeared at Dunfermline Sheriff Court and admitted that on July 15 last year, he smashed a house window.

He also admitted that at Pittsburgh Road, he assaulted a police officer by attempting to bite him and assaulted a second constable by attempting to kick her.

Depute fiscal Catherine Stevenson said at 4.50am Stewart had gone to the house and started banging on the door. He was shouting and then smashed the living room window.

When police were called to the scene, Stewart immediately became hostile to the officers and assaulted them after being arrested.

Stewart told police: “I don’t give a f*** that I smashed his window” and said it was a dispute about drugs he had bought.

Defence solicitor Aime Allan said substance misuse had been issue for her client since he was 13 but this was his first offence.

“He was under the influence and is remorseful,” she added.

Sheriff Francis Gill imposed a community payback order with 12 months of supervision.