THE irresistible allure of invading Afghanistan is only matched by the profound pain any such incursion produces.

This equation prompts the inevitable question of why anyone would want to march into a forbidding landscape populated by tribes who have no communal allegiance bar a shared facility for extraordinary ruthlessness.

By page 13, William Dalrymple has dealt with the major Afghanistan issues. The first is that its very geographical position makes it a crucial spot in world politics.

Now it is seen as the crucible for militant Islam, but in the 19th century – the time of Return Of A King – it was the scene of the Great Game, the political and espionage conflict played out by Russia and Great Britain. The conquest of Afghanistan is now considered necessary for lasting world peace but back then the country was viewed as the key to invading the British treasure house of India.

The tragedy of Afghanistan has been its position. The tragedy for the invaders has been the sheer obduracy of the inhabitants. Afghans are equal opportunity fighters: they will slaughter English, Scottish, Soviet and American troops with a uniform ferocity.

This second issue of the unforgiving nature of the threatened Afghan is detailed on page 3, when a blood feud ends after a chief invites 60 of his kinsmen to dine with him and blows them up after he has left the room under some pretext.

Ten pages later, when a chieftain has his mouth filled with gunpowder and a match is applied, one wishes to protest that one has both received and understood the message.

One of the gripping elements of Dalrymple's marvellous book is to wonder why major world powers did not immediately come to the same judgment, namely that Afghanistan was best left well alone, after the lessons learned by the first Western invasion of 1839. This expedition is the central focus of Return Of A King as 20,000 British and East India Company troops headed to Kabul to reinstate Shah Shuja ul-Mulk as ruler of the region, thus protecting the empire's interests.

Dalrymple is assiduous at charting the downfall of this hopelessly misguided and feckless attempt at trying to impose Pax Britannica on a volatile country. The planning was minimal, the arrogance considerable and the failure almost inevitable. The author is adept at picking out telling details such as junior officers travelling with up to 40 servants, and 300 camels being earmarked to carry the wine cellar.

His triumph, though, is to describe in brilliant, exact language events such as the horrific retreat from Kabul and to draw vivid portraits of the main characters in a spell-binding drama. One personal favourite is the description of Brigadier John Shelton as "a cantankerous, rude and boorish man who lost his right arm in the Peninsular War". Incidentally, when he went the way of all flesh, his troops gave a hearty three cheers on the parade ground.

More central to the unfolding catastrophe of the first invasion of Afghanistan, though, was William Elphinstone, a gout-suffering incompetent whose knowledge of the region and its inhabitants was minimal. Dalrymple manages to both condemn properly the actions of Elphinstone while also offering an affecting description of his death.

This rare gift of descriptive powers, empathy with central characters, and a hard-earned but easily expressed knowledge of the region and its culture make the Return Of The King an early contender for book of the year.

Its many accomplishments include a strong Scottish dimension. Many of the major players on the British side – including the unfortunate and dithering Elphinstone – were Scots and these also included Colin Mackenzie, a brave and resourceful officer, who is related to the author.

Most notably, however, Dalrymple brings to life Sir Alexander Burnes whose talents as a political officer were wilfully wasted and whose advice was ignored. Burnes, a Highland Scot, was rewarded with a knighthood but his fate reflects that of many invaders of Afghanistan then and since. He first found favour with some of the inhabitants, he also believed he had some influence, but he became isolated and vulnerable in the excess of Kabul. He was finally consumed by the mob, cut to pieces by the reality of Afghanistan. His body parts were found littering a tree in his garden.

There is much in Dalrymple's superb book that has contemporary resonance. There was a dodgy dossier in the 19th century, there were accurate warnings that went unheeded and there was the folly of trying to impose Western ways and culture on natives who wanted neither. But it is the remains of Burnes, an intelligent young man corrupted by the vanity of the invader, that chills the soul and lead to a contemplation of the futility of both the invasion of 1839 and every subsequent attempt to subjugate the Afghans.

The British, the Soviets and the Americans have all tried to shape a country through force but the final reckoning can be found in Dalrymple's book with the observation that the 19th-century invasion and subsequent retreat left Afghanistan much as the British found it.

This may be as true today as it was in the days of Burnes or of the Soviet soldier. There seems one unyielding truth on the harshest of battlefields. The way of life in Afghanistan goes on, no matter how many victims are thrown at it.