The border guards were impassive men wearing black jackets, guns and surly expressions. It was the middle of the night and a cold, rain-laden wind was whipping the train, halted at a former outpost of the iron curtain.
It was classic crime thriller stuff – high wire fences, lights glowing dimly in a railway yard, the Bulgarian flag flying from a forbidding, communist-era building bristling with antennas.
It was an Orient Express moment, but we weren't aboard the opulent icon that glides once a year between Paris and Istanbul, at a cost of £5,700pp. We were on the Bosfor Express from Bucharest, one of a series of trains that retrace the legendary journey at a fraction of the cost.
It was my wife's idea. Enthused by Agatha Christie's 1934 murder mystery, she had long dreamed of hurtling eastward across Europe on night trains. Which is how we found ourselves at Paris's Gare de l'Est, gazing at the departure board for the Deutsche Bahn City Night Line to Munich.
The silver coaches gleamed in the lamplight, and our compartment was welcoming. We were travelling first class, which meant we had sleeping cars to ourselves – no risk of sharing them with a grumpy Paul Theroux.
It was an early evening departure and there was a restaurant car, with Hercule Poirot sitting at an adjacent table. A middle-aged man with a remarkable resemblance to Albert Finney, he was thinly disguised with gold-rimmed glasses and a green silk scarf knotted artistically above a dark jacket. We passed an agreeable hour speculating on who among our fellow diners might be plotting to do away with whom. Later, a few glasses of wine were enough to rock us to sleep as our iron horse rattled through the night, bound for Bavaria.
We scheduled the journey to allow full days between trains in Munich and Budapest, and in Munich we headed for the Müllersches Volksbad, an art nouveau temple of relaxation, with saunas, steam baths and hot rooms. It was winter, and we looked out at ducks waddling in snow before we boarded the midnight train to Budapest.
This was a Hungarian train, and the spacious sleeping cars were spotlessly clean, with burgundy decor. This time the beds were bigger, and the usual clanking and clunking of the night barely register in a cocoon of comfort.
Morning brought our first view of Hungary, which was disappointing – a large sign pointing to a McDonald's, and a sewage plant. But the scenery improved, with fields and forests under a blanket of snow, and farming communities of solid little houses with red roofs, clustered like friendly and inviting toy towns.
The problem with travelling by train is that one keeps wanting to get off it, to explore unfamiliar landscapes.
In Budapest, there was time for a sightseeing bus trip, a stroll around the Buda Castle area, and immersion in the thermal springs of the Gellert Baths, before boarding the Ister Express to Bucharest. This was our most luxurious train yet. Our compartment was roomy, with en suite toilet and shower, and snuggly duvets. Hot food was being served in the wood-panelled dining saloon, but we were the only customers: the cook, the guard and the ticket collector sat at a corner table playing backgammon.
A few fellow passengers appeared at breakfast, mostly men drinking beer, as we rolled through a winter wonderland in the Transylvanian highlands. This was one of my favourite places, a higgledy-piggledy landscape of rustic villages, haystacks, old wooden fences and inviting footpaths. Railway workers, huddled around fires in the snow, waved as we trundle by.
Another hour, another world. Having seen what the Stalinist madman Nicolae Ceausescu did to eradicate any semblance of beauty in Bucharest, we didn't stop for long. Forty minutes between trains is deemed enough. The grimy apartment blocks came and went, and we were on the Bosfor Express on the last leg of our journey.
There were no catering facilities on this train, but we'd stocked up on Hungarian bread, ham, cheese and wine, and our friendly Turkish guard Nazmir brewed tea and coffee on a camping stove in his compartment. So we settled down for lunch in our travelling bedroom and surveyed Bulgaria. It wan't a cheery sight. We'd left Romania's woods behind and crossed a broad, brown river on an iron bridge into an industrial morass of docks, cranes and chimney stacks rising gloomily into low clouds.
It was 3am when we were brought to a halt on the Bulgarian-Turkish border. In contrast with the hard-faced Bulgarian officials, we were welcomed to Turkey by singing football fans celebrating their team's victory. They emerge noisily from a duty free outlet on a station platform as a policeman issues our visas and sends us on our way. Above us, a bright crescent moon hung in the night sky like an image of the Turkish flag bidding us welcome.
The next day, a freight train broke down on the line and we were bundled into buses for the last few miles to Istanbul. My wife was disappointed, but the amiable chaos of the Golden Horn and the rocket spires of the Blue Mosque soon wove their magic in the city of a thousand sensations. And Poirot is at the railway station to greet us, beaming from a film poster beneath the vaulted ceilings and stained glass windows of the Orient Express restaurant.