Two vandals who carried out graffiti ‘tag’ attacks on heritage railways have been warned by a judge to expect prison.

Jake Gardiner, 21, and Joe Layfield, 19, pleaded guilty to criminal damage at the Keighley and Worth Valley Railway and the Yorkshire Dales Railway, in Embsay.

The pair also vandalised a regular service Northern Rail train in Bradford, the city’s Crown Court was told on Monday.

Judge Peter Benson adjourned sentence until March 12 for the preparation of probation reports.

But he warned the pair to expect custodial sentences to act as a deterrent to others.

Judge Benson said: “People spend hours creating these resources so that other people can enjoy steam engines in the countryside.

“It must be frustrating for them when idiots like you come along and deface the trains that they put so much time and effort, at no profit, into running for the benefit of the community.”

Gardiner, of Morris Grove, Leeds, and Layfield, of Tinshill Lane, Cookridge, Leeds, admitted damaging an electric diesel unit belonging to Northern Rail, at Bradford, on April 25 last year.

Layfield also pleaded guilty to damaging a diesel multiple unit belonging to Embsay and damaging carriages belonging to the Keighley and Worth Valley Railway.

Gardiner admitted damaging carriages at Embsay and Oxenhope.

Prosecutor Richard Davies said each would be asking for further offences to be taken into consideration by the sentencing judge.

The court heard that Gardiner was about to start a teacher-training course and Layfield was an art student.

After the case volunteers at both railways said the pair had struck at crucial times causing an estimated £40,000 of damage.

Paul Brown, chairman of the Keighley and Worth Valley Railway, praised police for catching the pair.

He said: “We are delighted with the outcome. This vandalism was ruining years of painstaking restoration work. They hit both coaches and the diesel units.”

Right: Paul Brown, from the Keighley and Worth Valley Railway, in one of the carriages damaged by graffiti. Below: Damage to one of coaches which was stored in the partially covered shed at Oxenhope station, in December 2007. Railway volunteers worked to ensure that the damage was rectified in time for the booked Santa Specials and no trains were cancelled or disrupted.