A bungling burglar, who found himself locked in a Dunfermline school after he activated the alarm system, has appeared back in court.

Kieran Hamilton also broke into a local pub and stole from cars but managed to avoid a jail sentence earlier this year.

Instead, the serial offender was ordered to do unpaid work and pay compensation.

However, Hamilton has only done 17 out of 200 hours of unpaid work and paid nothing towards the £500 compensation order.

As a result, he was back in the dock at Dunfermline Sheriff Court.

Hamilton, 29, of Alma Street, Inverkeithing, previously admitted a series of crimes.

On August 25, 2021 in Clerk Grove, Dunfermline, he entered an unlocked car and stole items including a pair of trainers, leggings, a debit card and money.

On the same day, he entered another car in the street and stole a dashcam and two pairs of sunglasses.

On the same day he was in possession of cocaine.

On September 12, 2021 he broke into the Barley Sheaf pub, Evershed Drive, with intent to steal.

READ MORE: Man charged with sexual assault on a bus

On the same day, he was found in the curtilage of a house in Calaisburn Place, whereby it could be inferred he was intending to steal.

Also on the same day, he broke into Dunfermline High School with intent to steal, accompanied by another male.

The pair had forced open a door and went into the administration offices.

Hamilton was put on a community payback order with 200 hours of unpaid work and a year of supervision.

He was also ordered to pay a total of £500 compensation.

Defence solicitor Stephen Morrison said the lack of progress with the unpaid work was because of “a skin condition, mental health, stress and anxiety”.

He added: “It seems like this is genuine.”

However, Sheriff Susan Duff ordered Hamilton to start paying the compensation at £50 a month and continued the case until December 4.

She told him: “You’ll pay this compensation whether you like it or not.”