It wasn’t exactly the Flying Scotsman more the flying Pacer but Huddersfield charity Platform 1 had lift off at the second attempt.

The mental health charity, based at Huddersfield Railway Station, won the Pacer train in a Department for Transport competition.

But it then faced the logistical headache of craning the 15-tonne train up and over the wall and into the station.

Its first attempt in May had to be called off due to safety fears but a second “midnight” operation on Saturday night went ahead successfully – though it was 5am on Sunday by the time the Pacer came to rest inside the station.

Charity volunteers, led by project manager Bob Morse, stayed up through the night to see the train safely lifted into position.

A towering 150-tonne crane had to be hauled into St George’s Square and then built before the operation could begin.

Once the crane was ready it had to move an old shipping container to make room for the Pacer to be slotted in.

When the Pacer was finally hooked up the lift itself took no time at all and the operation went without a hitch.

Relieved Bob shouted: “Get in!” as the Pacer touched down in its new home. He admitted he might have had second thoughts about trying to win the train had he known what it entailed at the outset.

The Pacer will be used as a kitchen and a training centre. An official opening is planned shortly.