A boy with ADHD broke into a school and caused £1,815 of damage because he felt “compelled” to do so, a court has heard.

The 17-year-old, who is from Dagenham but cannot be named for legal reasons, was spotted inside Robert Clack School on January 4 by a security guard, Barkingside Magistrates’ Court was told.

He was seen smashing a door in the dining room with a large scaffolding pole before walking away.

Police then spotted him and, following a chase, he was arrested.

For the defence in Wednesday case, Mr Stuart-Mills said the boy’s ADHD restricted his ability to act freely.

“He felt impelled – or compelled – to commit this offence,” he said. “In his view he didn’t do it for a rational motivation of gain.”

Mr Stuart-Mills went on explain the boy has since shown “stabilisation” and seems to be on an “upward trend” in care.

“The devil will provide work for idle hands,” he said.

Chief magistrate David Hartshorn extended the boy’s referral order from six to nine months and waived the victim surcharge.

“You have got to help yourself,” he said.