WHEN John Wall was just two years old, his life changed forever. His parents moved to within yards of a railway line and, ever since, he has been fascinated by trains. As a schoolboy, he would scramble down to the side of the track and spend hours watching the trains go by, a notebook in his hand to jot down the names and numbers of locomotives on the East Coast Mainline.

His interest continued when he took up a post as a teacher and he was allowed to choose his own classroom. For him, there could be no better view from his classroom window than that of the Stockton and Darlington railway.

Decades later, his passion is burning as brightly as ever, and has seen him spend the past 18 months researching the history of the world's first steam-worked passenger railway. And his research has uncovered the startling fact that the railway was very nearly also one of the shortest-lived in the world.

Wading though Stockton and Darlington Railway Company documents, stored in Darlington Railway Museum, John discovered that, in the railway's early days, steam locomotives were almost abandoned in favour of horse power. The locomotives were dogged with technical problems and proved very unreliable, prone to serious mechanical faults, on occasion resulting in serious injuries and even fatalities among the drivers.

The catalogue of disasters reached such an extent, that the company discussed abandoning the locomotives and using horses to pull stagecoaches along the tracks instead.

"I discovered the information in the company's committee meeting minutes," says John. "They did not make a definite decision, but they were seriously contemplating abandoning steam locomotives in favour of horse power. The locomotives were not very reliable, they kept breaking down and there were a few fatalities. It all changed when Timothy Hackworth, the chief engineer, designed the Royal George. This saved the steam engines and set a precedent for future designs."

Now John's research has been gathered together in a book, inspired by memories of growing up in Darlington. First In The World traces the story of the Stockton and Darlington Railway Company through the 19th Century, from its inception and through its golden age as a landmark of Victorian engineering.

"I decided to write the book simply because of my passion for railways and, as a native of Darlington, I was very surprised there was not a definitive history of the railway," says the 73-year-old. "There's this remarkable railway that is called the first in the world, but I didn't think there was generally a good history which was readable. The book contains scientific methods as well as human stories, such as the personality clash between locomotive pioneer George Stephenson and businessman Edward Pease."

The book also recounts the tale of how the Stockton and Darlington line was very nearly the Stockton and Etherley line - avoiding Darlington altogether. Business leaders in Stockton wanted the line to run between their town and the Durham collieries, with the 35-mile track terminating at Etherley. It was only the determination of the Pease family that ensured it went to Darlington.

"The Stockton party originally wanted the railway to go direct from Etherley, bypassing Darlington. The Darlington party, which was predominantly headed by the Pease family, in particular Edward Pease, kicked up a stink because they had their own interests," says the former history and religious studies teacher. "They wanted the line to come to Darlington for their own interests because of Pease's Mill. It very nearly could have been the Stockton to Etherley line."

First In The World also contains a detailed study of the early railway system, biographies of the key figures and looks at the obstacles that had to be overcome when the Stockton and Darlington railway was developed.

"One of the best bits for me when I was researching the book was getting out into the fields and walking the lines," says John. "The Stockton and Darlington railway really is not just one line. It became a empire. It stretched from Consett to Barnard Castle and over to Saltburn. The tracks are the bed of this empire. Researching the tracks has been the most astounding part for me."

John is also a keen photographer, and he worked with former editor of The Northern Echo, Harold Evans, to set up the National Photographic Record in Duke Street in the 1970s. His first love, though, is still the railways.

The book features for the first time a portrait of railway king George Hudson and also John Dobbin's famous sketch of the opening of the Stockton and Darlington railway. "One of the really interesting things that I discovered was that, despite the fact that the Stockton and Darlington was the first to employ steam locomotives, its claim to fame is being the first passenger railway," says John. "Yet, when it was built, it was primarily to transport minerals - allowing passengers to travel was very much secondary."

The building of the railway wasn't plain sailing and it lead to clashes between rival rail companies. "The greatest battle was between George Hudson, who proposed a line north through Darlington from York to Newcastle, right through Stockton and Darlington territory, and Edward Pease."

Even now, John's passion for railways is as strong as ever. "The motto of the Stockton and Darlington railway was, 'Provide Risk for Public Service'. It seems it could be adapted for the present controversies of the state of the railways today." And his interest has rubbed off on to son Michael, who is similarly train obsessed.

John is now planning another book about the railways, although he is keeping the exact subject close to his chest until it is completed. And there is a sense of coming full circle as he carries out his research, working from his home in the North Yorkshire village of Kirkbymoorside. Just like his classroom at Middleton St George, near Darlington, one of the reasons he chose the house was that it was near to the railway line, this time the North York Moors Railway. Just like when he was a little boy, John still watches the trains go by.

l First In The World by John Wall is published by Sutton Publishing, priced £19.99