A pair of youths who left an industrial wheelie bin on a railway line before it was hit by a freight train have walked free from court.

Matthew Robinson, 20, and a 17-year-old lad had both been drinking before the put items on the line as they messed about on the platform at Trowbridge station shortly after 1am.

About four hours later a freight train pulling eighteen empty 100 ton wagons smashed into the obstruction which got wedged under the locomotive.

The incident before the morning rush, caused chaos across the network and First Great Western had to hire coaches to move passengers past the blockage.

In total it was estimated that Network Rail and the train companies spent just short of £40,000 as a result of the incident.

Claire Marlow, prosecuting, told Swindon Crown Court on Friday that train driver Mark Young was heading towards Bath from Westbury at 5am on Tuesday, October 14.

As he approached Trowbridge station he noticed the large red bin on the line in front of his and despite slamming on the emergency brake ploughed into the object.

She said it took about 1,000 feet for the train to stop by which time the bin was wedged underneath, damaging both train and track.

Fortunately he was uninjured but the train had to be jacked up to remove the bin which had become stuck.

Miss Marlow said transport police looked at CCTV footage from the station and saw the defendants on the platform shortly after 1am.

Robinson was seen pushing an Asda shopping trolley on to the line but he later moved it away.

Meanwhile he brought the giant bin from outside the station through the concourse and on to the platform where the teenager tipped it on to the rails.

Robinson, of Painters Mead, Hilperton, and the teenager, from Salisbury, pleaded guilty to endangering the life of railway passengers.

Mike Pulsford, for Robinson, said his client was drunk and the time and realised now what he had done was not only stupid but very dangerous.

“Quite frankly it started out as skylarking, of course alcohol being a disinhibiting factor and there being a group of them it went too far. My client never intended for passengers to be put in danger.”

He said they had tried to get the wheelie bin off the track but had been unable to do so as it was so heavy, and from then on they were too frightened to tell anyone about it.

Adam Norris, for the teenager, said his client could not explain why he did what he did on the night in question.

He said “Essentially these two boys were not thinking about what they were doing.”

Passing sentence Recorder Euan Ambrose commented on their failure to alert the authorities to what they had done and avert the crash.

“You put your own risk of getting into trouble above the risk to others,” he said.

He put Robinson on an 18-month community order with supervision, a think first programme, an alcohol treatment requirement, 80 hours of community service and a curfew from 8pm to 5am on Thursday, Fridays and Saturdays for six months.

The teenager was put on a two year supervision order with a six month intensive supervision and surveillance programme with an 8pm to 5am curfew.