The Railway Children is a children's book by Edith Nesbit, originally published in 1906.
The story concerns a family who move to a house near the railway after the father is imprisoned as a result of being falsely accused of selling state secrets to the Russians. The three children, Roberta, Peter and Phyllis, find amusement in watching the trains on the nearby railway line and waving to the passengers. They become friendly with Perks, the station porter, and with The Old Gentleman who regularly takes the 9:45 down train. He is eventually able to help prove their father's innocence, and the family is reunited.
The theme of an innocent man being falsely imprisoned for espionage and finally vindicated might have been influenced by the Dreyfus Affair, which was a prominent world-wide news item a few years before the book was written. Also the Russian exile, persecuted by the Tsars for writing "a beautiful book about poor people and how to help them" and subsequently helped by the children, was most likely an amalgam of the real-life dissidents Sergius Stepniak and Peter Kropotkin who were both friends of the author.
The BBC again revisited the story with an 8 episode series in 1957 and again in 1968. The 1968 adaptation was placed 96th in the BFI's 100 Greatest British Television Programmes poll of 2000. It starred Jenny Agutter as Roberta and Gillian Bailey as Phyllis. Of all the TV adaptations, only the 1968 version is known to be extant (it is currently available on DVD); the rest may be lost.
A new stage adaption by Mike Kenny is currently being performed in the National Railway Museum. The adaption stars Sarah Quintrell, Colin Tarrant, Marshall Lancaster and features a working Stirling Single (GNR 4-2-2 No.1) steam locomotive on a real rail track.