Imagine you could create your ultimate fantasy train set. For me (and I suspect possibly you) it would be a network of quaint branch lines passing through some remote, timeless and beautiful landscape. The little wayside stations would be immaculate and the regular train service would run on time every day. The engines would be steam-powered and polished to a tee – just like the carriages.

The stationmasters and porters are in smart uniforms, greeting passengers with a cheery wave, and the ticket offices are always open. Most important, the line would serve real people going about their daily business, not serve as a museum piece for trainspotters. Could such an idyllic railway exist in 2016?

Michael Williams thinks he's found the perfect steam train Credit: Olenkaaa - Fotolia

Well, I think I’ve come close to finding it this fine morning as I catch a whiff of that tantalising cocktail of coal, warm oil and sulphur wafting along the street in the German town of Werningerode, that signifies only one thing – that there is a steam train waiting to depart.

“Whatever you do, don’t call this a 'Toy Train’, just because we’re narrow gauge,” says Heidi, who hands me my ticket at this, the main terminus of the Harzer Schmalspur Bahnen, otherwise known as the Harz Railway. “You just wait till you’ve travelled on it.”

And I soon find out what she means. Although it has a gauge of just a metre this is a grown-up railway of superlatives. With three interconnecting lines extending just over 140 kilometres and serving 48 stations it is Europe’s longest railway network with daily steam operation, and has the largest fleet of passenger steam locomotives, with 25 engines. “We’ve got 10 running this morning alone,” Heidi tells me. “And this is a quiet time of the year.” Nowhere else in the world can anything like this still be experienced.

Crucially, unlike almost all the hundreds of “heritage” railways around the world masquerading as the real thing, the Harz runs a proper timetabled service throughout the year, attracting 1.1 million passengers – a mix of hikers, tourists, shoppers, schoolchildren, commuters, country folk off to market – and folk who come here simply to marvel.

"The Harz’s extraordinary survival is partly thanks to being caught up in a time warp as part of communist East Germany, which never had the money and incentive to modernise" Credit: Luftbildfotograf - Fotolia

Today I am one of them, clutching my ticket for a journey, which, unlike almost any train ride in the world, is simultaneously lodged in the past and the present. The Harz mountain region of the former East Germany, through which the three branches of the HSB pass, is the land of ancient fairy tales – dark forests, rushing streams and snow-capped mountains.

Here are unspoilt medieval towns, such as Quedlinburg and Goslar, with steep-roofed houses and narrow cobblestone streets that have slumbered unchanged for centuries. Yet the trains that serve them, despite their antediluvian motive power, run as efficiently as any modern railway.

That’s not all. My 09.47 train this morning will take me along the Brockenbahn section of the line to the snowy peak of Brocken mountain – at 1,142 metres the highest in northern Germany. If the legends are to be believed, this will be one of the most thrilling steam rides on the planet.

"The Harz is a land of ancient fairy tales – dark forests, rushing streams and snow-capped mountains" Credit: mojolo - Fotolia

And there, in the adjacent locomotive depot – so tidy that it looks like an illustration from a Thomas the Tank Engine book – is the 2-10-2 tank engine that will pull our train. The driver is polishing its paint to a blackberry shine, while the fireman fusses around with the oilcan. Even the smart red paint on the wheels is being enthusiastically burnished so that no spot of grime remains.

The Harz’s extraordinary survival is partly thanks to being caught up in a time warp as part of communist East Germany, which never had the money and incentive to modernise. Why bother when there was plenty of coal for the engines and lots of cheap labour for undertaking the dirty work of firing and maintaining machines?

Founded between 1886 and 1897, the Harzquerbahn, the Selketalbahn and the Brockenbahn, the three lines that form today’s network, thrived in a region prosperous with mining, agriculture and tourism until dramatic change came with the division of Germany after the Second World War. Suddenly this branch line backwater assumed a crucial role in the security of the entire Soviet bloc, transporting troops and supplies to the top of Brocken mountain, home to one of the main Russian listening posts for obtaining information on western Europe. (The Stasi security men, depicted in the hit Channel 4 series Deutschland 83, would probably have received some of their sinister intelligence through here.)

When the border fence came down in 1989, here was an unreconstructed slice of Soviet-era transportation preserved in aspic. And for today’s traveller with an eye for period pieces of the Fifties and Sixties there is nostalgia and ostalgie galore (the nickname for the craze for all things East German).

While our train’s locomotive, No 99 7237-3, has an immaculate Soviet Bloc pedigree – having been built in 1954 at Lokomotivbau Karl Marx at Potsdam Babelsberg – it is curiously reminiscent of the British Railways “Standard” tank engines that used to ply commuter trains out of Britain’s big stations. Even the livery of carriages uncannily resembles that of the old BR “plum and spilt milk” colours of the period.

Goslar Credit: Torsten Radmann - Fotolia/Picasa

“You’re going to be lucky with the weather this morning,” the guard tells me as he gets ready for the “off”. For 300 days of the year, the top of the mountain is shrouded in mist, but this morning there’s apparently bright sunshine. “But the snow is really deep – and it’s minus 12 degrees at top.” (Fortunately I’ve packed a filling East German lunch of bread and dripping with a large chunk of brawn.)

The hour and 40 minute journey along the old East German border is a tough one for both the train crews and the 60-year-old locomotives, which have to be in sewing machine-like mechanical condition for the journey up gradients of 1-in-30 in all weathers, without the help of cogs in the track. Open verandas between the carriages defy health and safety protocols and allow (well-wrapped) passengers to soak up the pine-scented atmosphere – as well as get smuts in your eyes and hair.

Before the final climb through the thick forest that lines the mountain, the train stops at the perfect little country station of Drei Annen Hohne, where engine takes water and the crew climb nimbly over the locomotive – prodding joints, tapping wheels and delving into its recesses with an oil can. An old station clock ticks away, but nobody is in too much of a hurry.

Then, with a whoop, whoop…whooh-whooh on the hooter we are off, climbing above the tree line, circling on a track that spirals around the top of the mountain to gain height. The sharp bark of the engine’s exhaust reverberates off the mountainside, and the views are sensational, with a mass of snowy whiteness extending as far as the eye can see.

Don’t be surprised at the terminus if you detect a whiff of sulphur – it may not be emanating solely from No 99 7237-3, relaxing with a steamy sigh from her efforts up the mountain. The summit here has long been associated with all sorts of devilish deeds, most famously as the centre for revelry for witches in Goethe’s Faust.

The evils of more recent times can be recalled in the “Stasi mosque”, the former surveillance installation for the Ministry of State Security, now – perhaps ironically – an information centre, where the curious can visit the historic antenna equipment in the dome. It’s all very jolly, and there’s something of an excursion atmosphere as the by now well-filled train pulls out for its journey down the mountain.

But it’s easy to forget that only a few decades ago, East German soldiers would routinely board the trains looking for dissidents intent on leaping across the border. (The penalty would be to get shot without demur.) Further along the line, near a station appropriately called Sorge – meaning “sorrow” – some fragments of the old fence and a watchtower remain as a grim reminder.

But those seeking some of the more tranquil joys of the old GDR (of which there were many, especially in the countryside) should change trains at Drei Annen Hohne junction and head along the Selke Valley branch to the historic World Heritage Site town of Quedlinburg.

"It is a romantic journey through picturesque beech and oak forests, with high plateaus and flowering meadows" Credit: ANGELIKA BENTIN

Reminiscent of some of the country branch lines of Britain in the pre-Beeching era, it is a romantic journey through picturesque beech and oak forests, with high plateaus and flowering meadows.

Half close your eyes and you could imagine a group of healthy young hikers from the Communist Youth League, straight out of a Socialist Realist poster at the other end of the carriage.

In Britain, we would probably have closed it down – just as the infamous Dr Beeching shut swathes of similarly beautiful rural railways across our own countryside. But the forward-looking management of the HSB (financially backed by the local authorities of the area it serves) has done quite the opposite. When the Deutsche Bahn (the German State Railway) couldn’t make a go of its own route into Quedlinburg a few years ago, the Harz took over the track bed, laid on some steam trains (though mostly diesels in winter), and has turned the revived railway into a huge success.

Quedlinburg, birthplace of the German nation, with more than 1,300 preserved half-timbered houses Credit: bbsferrari - Fotolia/Sergey Dzyuba

The unspoilt fairytale town of Quedlinburg, birthplace of the German nation, with more than 1,300 preserved half-timbered houses, could not be a more appropriate place to end our journey, since like the Harz Railway itself, it, too, was one of the old East Germany’s “sleeping beauties”.

These days, the local station is shared with the modern state-of-the-art trains of the Harz-Elbe Express, which can whisk travellers on to Berlin or Hanover and then on to London St Pancras via Cologne on some of the finest and fastest high speed trains in the world.

Compared with today’s air-smoothed trains on the adjacent platform, the little Harz service looks antiquated indeed. But I know which I would take to enjoy the timeless soul of rail travel.

How to ride the Harz Railway

Michael Williams travelled with Rail Discoveries (01904 527180; raildiscoveries.com), which offers a seven-day escorted group holiday The Harz Mountains from £795 per person. Price includes all rail and coach travel, hotel accommodation with Maritim Hotels, excursions to the Unesco-listed towns of Goslar and Quedlinburg, a steam-hauled journey on the heritage Brocken Railway and a journey on the Selketal narrow gauge railway. Itinerary includes free time in Braunlage.

For more information, go to harzinfo.de, goslar.de, and quedlinburg.de

The Trains Now Departed: Sixteen Excursions into the Lost Delights of Britain’s Railways by Michael Williams is published by Cornerstone. To order your copy for £8.99 plus p&p visit books.telegraph.co.uk or call 0844 871 1514.