BATTLING up the western slopes of the Pennines, the double-engined train ground to an unscheduled stop. It was late on a raw winter's night, and the second of the two locomotives had run out of steam.

During the ten-minute halt while the boiler was furiously stoked to build up a new head of steam, the 400 passengers drew but one conclusion. The loco which had delayed their journey did not want it to end.

For this was the last train over Stainmore summit. A fierce two-year fight to save the line had failed. The leading engine on the final journey from Penrith bore a wreath. And when the train touched the Darlington buffers around midnight, the highest line ever built across the Pennines passed into history.

That was 40 years ago last January. But memory of the Stainmore lives on. This summer three exhibitions will mark the anniversary of the line's demise - and hopefully provide a springboard for at least a partial revival. For that is the bold aim of the Eden Valley Railway Trust, now gathering material for the exhibitions at Barnard Castle, Kirkby Stephen and Appleby.

Overshadowed in recent years by the Settle-Carlisle Railway, the Stainmore line was arguably a superior engineering feat. For while the Settle-Carlisle threads its way through the Pennines, and is forced underground to do it, the Stainmore line, uniquely among all trans-Pennine railways, crosses the great mountain chain without a tunnel. And it does so at one of the Pennine's bleakest spots, 1,370ft above sea level.

This amazing feat was the achievement of the line's engineer, the Cumbrian-born Thomas Bouch. Later unjustly vilified for the collapse of his Tay Bridge, whose crucial fault was its inferior (alas Teesside-made) iron, he ingeniously followed the contours to avoid tunnelling - and keep down costs.

For the same latter reason he built the two largest of the line's 174 bridges - the great viaducts of Belah, between Barras and Kirkby Stephen, and Deepdale, near Barnard Castle - of iron rather than stone. Towering 196ft, Belah was the loftiest viaduct in England - a mere foot short of Britain's very highest, at Crumlin in South Wales. And Deepdale, at 160ft, was scarcely less impressive.

Unlike the ugly tubular structures on the railways of the Yorkshire coast, these lattice-girder viaducts of Bouch's had a rare grace. British Rail tore them down within two years of the line's closure.

Conceived by much the same mainly Quaker group that pioneered the Stockton and Darlington Railway - Henry Pease and friends - the Stainmore line was intended, in the grand words of its prospectus, "to connect the Ports of the North Sea with those of the Irish sea, and to unite the manufacturing districts of Durham, Northumberland and Cleveland with those of Lancashire and the West".

Practically, this meant traffic in rich haematite iron ore from Furness to Teesside, with coke and coal in the opposite direction to feed ironworks at Barrow and later West Cumberland. Ironically it was the Duke of Cleveland, who had opposed the Darlington-Barnard Castle railway, first link in what became known as the Stainmore railway, who cut the first Stainmore sod, at Kirkby Stephen at August 5, 1857. Two months later Pease laid the foundation stone of the 16-span Belah Viaduct, which legend has it was built in 43 days, though even the actual four months was remarkably swift.

Though freight was always the priority, with trains operating round the clock a century ago, even when the line opened in 1861 there were two passenger trains in each direction daily and an extra train on market days. And only three weeks after the opening, a six-coach excursion train to the Lake District ran from Darlington to Windermere, via Tebay. A striking instance of the rapid impact of railways on leisure and travel, the occasion was marred by an accident on the return, when the train left the rails on the descent from Bowes, killing the driver and injuring several passengers.

To handle the increasing passenger traffic, which from 1862 also used a new line from Kirkby Stephen to Penrith, the loco engineer William Bouch, brother of Thomas, designed a pair of locos named Brougham and Lowther. A feature was their commodious cabs, to protect the crew against rough weather. But the railmen professed to prefer an open footplate.

Again unusually, the summit signal box was sheathed in cement. But the line's opening was delayed a year by rain and snow, and Thomas Bouch's economy in not building tunnels was soon wiped out by higher operating costs.

During heavy snowfalls, locos were deployed backwards and forwards between Kirkby Stephen and the summit just to keep the line open for scheduled trains. In the winter of 1947, even jet blowers, brought in when the heaviest snowploughs had been defeated, could not release a snowbound train, which remained trapped on the closed line for two months. In 1955, when blizzards again blocked the line, the colossal effort to reopen it near Barras was recorded in a now classic British Transport Commission film, Snowdrift at Bleath Gill.

Meanwhile the motor car was capturing the line's passenger traffic, which once sustained six trains each way daily. The body blow came in 1959 when British Rail diverted the line's Teesside-bound limestone, its principal source of revenue, via Carlisle and Newcastle. An offer by Kirkby Stephen quarry owner William Sayer to buy the line to protect this business was refused. His limestone now took three days to reach Teesside instead of three hours.

A joint report by the regional rail watchdogs for the North-East and North-West ordered British Rail to take "positive steps" to develop the line. But in 1961 the sole midweek excursion train on the line did not run until Wednesday, September 13 - after the holiday season and when it was dark by 8.30.

In Darlington, just a week before the last train ran, protestors against the closure packed the last of many public meetings. But John Ropner, chairman of the joint rail watchdog, told a press conference: "We have given the gravest and deepest thought to this problem, and with the greatest regret and sympathy for everyone concerned, I do not think the line can live on passenger traffic." Stainmore's fate was sealed.

And so the last train ran on Saturday, January 22, 1962. The mayors of Penrith and Appleby and the entire parish council of Kirkby Stephen bid the train farewell from their respective stations. At both Kirkby Stephen and Appleby a local brass band played Auld Lang Syne. Besides its wreath, placed there by a black-armbanded schoolboy, 15-year-old John Brown from Newcastle, the leading loco also displayed the code of the Stockton and Darlington Railway, which worked the line for the two years from its outset until the S&DR was absorbed into the North Eastern Railway.

The code was mounted on a bracket made specially by Darlington locomotive engineer, Geoffrey Jackson. And at Penrith the train was signalled off by a Stockton & Darlington Railway handlamp, while at Kirkby Stephen Mr Sayer appeared with three penny farthings - to suggest that BR was a trifle out of date.

The closure prompted a writer in The Northern Echo to remark that "probably no English railway of similar size has served so wide an area yet left it so little changed. No large towns have grown up, and the villages and small towns have retained their character."

Today the summit nameboard, bearing the height stamped out in iron, is exhibited in the National Railway Museum. Stations on the line have experienced varied fortunes. Once used by royalty visiting Streatlam Castle, the waiting room at Broomielaw, near Barnard Castle, became the bathroom of a private house. Highly-visible from the A66, the decay and collapse of Bowes' handsome neo-Tudor station has borne sad witness to the Stainmore demise.

For me, the line holds nostalgia for carrying "my wife and I", a then brand-new concept, on our honeymoon journey to the Lake District in 1960. As our train descended from Stainmore summit into the Eden Valley late on a golden afternoon, another passenger was leaning from a window taking a cine-film of the glorious views. How precious that will be now.

The panorama from Barras station embraced the Solway Firth - and, in steam days, the smoke of trains toiling up to Appleby on the old Midland line.

Trains will never cross the summit again. But the Eden Valley Railway Trust plans to reopen the line from Appleby to Warcop and, later, Kirkby Stephen - about 12 miles in all. Meanwhile David Heywood, EVRT archivist, of The Hollies, Barningham, Richmond, DL11 7DW (tel 01833 621239) would be pleased to hear of items that might be suitable for this summer's exhibitions - Barnard Castle Parish Hall, May 11-12, Kirkby Stephen Masonic Hall, June 22-23, and Appleby Heritage Centre, August 17-18.

The Stainmore railway is - and always will be - well remembered.