A peaked cap worn in one of the most famous British movies has been uncovered only half a mile from where it had its starring role.

The Edwardian-style hat was among memorabilia kept by the man who wore it in the making of The Railway Children 40 years ago on the Keighley & Worth valley heritage railway.

So when Graham Mitchell, a member of the society at the time, read that it was needed to celebrate the 40th anniversary of the making of the movie, he recalled he had the very hat.

He had worn it when he played the train guard alongside actor Bernard Cribbins, who played Station Master Albert Perks in the film.

Mr Mitchell said: “I read about the appeal and thought ‘Wow! I’ve got just the right cap’. It has been worn in many other films and re-enactments on the line.

“Essentially it’s the same type of cap that would’ve been worn by Bernard Cribbins.’’ David Petyt, who volunteers as station master at Oakworth, said: “I’ve been searching the country for a hat like this, then it turns up just half a mile away. Now I can wear it at the special weekend we’re holding over the May Bank Holiday to celebrate the 40th anniversary.

“And people are being offered a chance to be Mr Perks at Oakworth station, wear the cap, operate the crossing gate and blow the whistle.”

The weekend of May 1, 2 and 3 will see amateur actors in costume recreating some famous scenes.

The event will also offer people a chance to climb aboard The Green Dragon, which starred in the film, take cream tea in the Old Gentleman’s Saloon and wave to The Railway Children as they pass on the train.

Visitors will also be able to take part in a guided tour of the film’s locations.

An updated copy of the movie, which also stars Sally Thomsett and Jenny Agutter, has been digitally re-mastered and was premiered at the Bradford International Film Festival last month.