Every Friday the Flying Afridi, as it was once called, clanks and groans its way up the Pakistani side of the Khyler Pass and makes its way to Landi Kotal, just seven miles short of the Afghan border.

Except in times of war or military alert, the train, one locomotive at the front and another pushing from behind, stops here.

Close to 33 years have passed since Britain's Indian empire was finally dismantled, but Khyber and the old frontier station of Peshawar have still not quite shed the trappings of imperial Britain. The region, once known as the Northwest Frontier of India, is as acutely aware as ever of its military role in this troubled corner of Asia.

The pass would never prove much of a deterrent for a determined, modern war machine. Compared with the towering peaks of Afghanistan, where anything under 7,000 feet is officially a hill, the Khyber Pass -- which reaches 3,500 feet at its highest point and is domesticated with telegraph poles, two winding roads, escarpments dotted with regimental shields and solidly built tunnels -- seems distinctly unimpressive.

But the Pakistani firemen and engineers of locomotive number 2511 take a distinct pride in their job. No matter that their Friday passengers are mostly holiday-makers, carrying bundles of bread and spiced kebab for picnics at Landi Kotal, their 4 1/2-hour ride keeps the rust off the lines should the military ever want to reopen the line to one of the most jealously and ferociously guarded frontiers of the world.

Their 55-year-old charge is the dreamof every schoolboy. Originally built as a stream train in 1925, locomotive 2511 was modified 22 years later and today runs on oil with black smoke bellowing from its tea-pot lid funnel.

The 36-mile single track, originally sanctioned by a British Parliament as the Kabul River Railway from Peshawar to Landi Kotal and northwest to Torkham, takes locomotive 2511 up one of the steepest climbs in the world.

Besides the two engines the train has two-second-class carriages and one small freight wagon. The fare is about 65 cents each way.

"Only Pakistan's most experienced drivers are allowed on this run," says the wiry engineer Mohammed Bbatti. The driver from Rawalpindi is proud that despite the number of goats, cows and children wandering across the line, locomotive 2511 has never had an accident.

The cost of operating what is one of the last relics of empire is a secret. The weekly forays into Landi Kotal are financed by the Pakistan military, said the driver, because the line must be kept open for possible movement of troops and equipment to the frontier. On either side of the line are large concrete block tank traps put down during World War II.

The Kabul River Railway, as is true of much of Pakistan today, was built with the military in mind. Britain, hounded by rebellious tribesmen, was warily watching czarist Russia make overtures to Afghan leaders.

"The reasons for the construction of the Kabul River Railway are to be found in the inadequacy of the Khyber roads for the rapid dispatch of a large army into Afghanistan and for provisioning it when there," wrote Arnold Kennel, a British journalist in 1911.

"Supposing we ever had occasion to send an army into Afghanistan, this one avenue is easily interrupted, flanked as it is on both sides by presumably hostile Afridi tribes. In any case the road would never be sufficient for supplying a body of say between 60,000 and 100,000 men."

So a second road, the Mullagori, was constructed and the Kabul River Railway sanctioned as far as Torkham on the border. Fortunately for the Afghan leaders, the third Afghan war was finished when the flying Afridi finally began operation in 1925.

In any case, technology was already introducing new ways to cross the Khyber. During the third Afghan war of 1919 the British sent a Royal Flying Corps squadron of bombers to soften Afghan positions around the village of Dakka, but the pilots could not get enough altitude to go over the pass, so they flew through it, with the result, according to one historian, that the Afghan tribesmen perched on their hilltops became the first and only antiaircraft gunners in history to fire down at flying targets.

Further down the tracks are escarpments studded with plaques marking now almost forgotten moments in British history. A shield with a stag's head and crown remembers the Gordon Highlanders 50 years ago; another notes the presence of a unit from the 1st Battalion of the 22nd Cheshire Regiment that later merged with the King's Liverpool Regiment; and near by is the Royal Sussex Regiment, which has since been disbanded. The most recent, put up only last year, belongs to the Baluchis, and a Hindi plaque is all but illegible.

The same tracks split Peshawar, historically the wintering residence of Kabul kings, right down the center. On one side is what government brochures lyrically describe as "the old oriental bazaar redolent with the smell of luscious fruit, roasted meat and tobacco smoke."

On the other side is the old sprawling British cantonment with its barracks, churches and old missionary Edwardes College. What was once a scat of empire today has a certain seediness. Shutters are rotting and electric light bulbs hang naked from lofty ceilings. Outside, soldier's uniforms dry on long washing lines in the warm midday sun and the brass of military bands is occasionally punctuated by the dull clomp of a nearby cricket ball on wood.

Perceptions have apparently changed little with the passing of years. Just off the Khyber road lies the old British cemetery, a dark, dank place overgrown with rosewood and dock. Enteric fevre and heat stroke, as the old tombstones testify, took a hefty toll among the British community here.

So too did cholera, which in 1870 made Peshawar, in the words of Sir Robert Warburton, "a station to be avoided and dreaded . . . life and property were by no means safe and the cholera season of 1869 has been an exceptionally deadly one."

Landi Kotal fared little better. "What made the place so unhealthy," wrote the political agent of the Khyber district, "was the dreaded cholera. Irrespective of other evils of our system, over 1,000 dead camels, bullocks, donkeys had been buried and every now and then one came on a mound which on inquiry was found to be a dead camel left on the ground and covered over with only some dust and stones."

Many young Britons were killed in action, such as Lt. Bishop, who died at Shabkadr "in an engagement with the hill tribes, 1863. He was aged 22." Others were "assassinated by fanatics."

The lessons, it seems, have still to be learned. The dank little cemetery together with the railway that never carried British troops into Afghanistan and the rows of fading regimental shields all bear witness to the fate of past imperial ambitions.