THE LEGENDARY SUN has finally set on the British Empire and the India of the Raj has passed into history. In the inevitable sea-change that follows, its strenghts are being remembered, its weaknesses softened by time.

Riding the crest of this revisionist wave, this Cecil B. DeMille production of a novel - 15 years in the writing - brings those times close as only the most stirring fiction can. M. M. Kaye's formidable imagination, steeped in history, war and romance, conjures up sights and sounds of India, from palaces in the Himalayas to the docks of Bombay.

Ashton Pelham-Martyn, a hero worthy of the name, is the son of an eccentric British anthropologist working in India. Orphaned in a cholera epidemic at the time of the 1857 Indian Mutiny, Ash is saved by his nurse Sita, who then passes him off as her own son for his own protection in murderous times. As a teenager his true identity is revealed, but he has already grown up Indian and Hindu.

Nevertheless, British heredity is assumed to be thicker than Indian environment, and he is shipped off to England where his rich and aristocratic paternal relatives undertake to transform him into an officer and a gentleman.

When Ash returns to India as a soldier he pursues a checkered career torn constantly between his two heritages. He joins the Corps of Guides, leads expeditions into the Afghan mountains, escorts bridal corteges from one principality to another, revives his childhood friendship with Zarin Khan, an Indian now serving with the Guides, and finds a new friend in young Walter Hamilton, an idealistic fellow-officer. He can still pass for a Pathan tribesman, which enables him slip into hostile Afghanistan to report on the unrest that culminates in the Second Afghan War.

Ash's divided loyalties - his fierce understanding of Indian ways and his admiration for the spirit of the British army - lay the foundations for this novel's most impressive achievement: its balanced insight into the contemporary confusion and ancient order of 19th-century India. On one hand Kaye shows tremendous affection, sensitivity and understanding of the Indian people, thir culture, religion and traditions, as they attempt to live in an imposed British environment with all its narrowness and blunderings. Yet at the same time she gives full credit to those colonialists, both civilian and military, who make the best of an unheroic situation, whose sense of duty - however odd in retrospect - is strong and whose courage is unfailing.

One of these, a foil for Ash and a second, quite different hero, is his friend Wally Hamilton. He is practically the stereotype of an honorable man, unable to entertain any misgivings about Queen Victoria and her God-given Empire. But despite his almost comic, "pukka sahib" ideology, he is no caricature and his noble, lonely death in battle is truly moving.

The story of his heroism is based on historic fact, as is all the background to the unnecessary and calamitous Second Afghan War. Walter Hamilton of the Corps of Guides did die with all his men, defending the Residency in Kabul. His descendant, Goff Hamilton, himself a former officer in the Indian Army, is the author's husband. Kaye, who was herself born and raised in India, is completely familiar with the daily rituals of Hindu life and the insular ways of the expatriate British community. The volume of information, both social and historical, assembled here is immense.

Because Ash is always on the move, from Bombay to Rawalpindi to Mardan to the Khyber, his perceptions give the reader a sense of being caught up in the fabric of another time, with the bonus of having an informed insider's viewpoint. The tragic role of the Guides as pawns in the Afghan conflict would be bloodchilling as pure fiction, but the knowledge that Kaye's drama is based on actual events heightens our involvement. The fanatical messianic Sir Louis Cavagnari and his superiors in Whitehall did indeed play international power games while ignoring firsthand reports from the Northwest Frontier, as actual cables and correspondence quoted in the novel plainly demonstrate.

All this historic drama is interwoven with the high romance of Anjuli-Bai, princess of Gulkote, Rani of Bhithor, lover and finally wife of Lieutenant Pelham-Martyn. Lovers crossed by race, culture, religion and heredity are irresistible. Officers of the Guides needed the permission of their commanding officer to marry in those feudal days, not to mention the fact that Juli has already been traded to a dissolute Rana (as part of a package deal with her half-sister) before she and Ash fall in love. Throw in the ill health of the said Rana and the ancient custom of suttee (wives immolating themselves on the funeral pyres of their husbands) and another panel is woven into the gleaming tapestry.

This intricate blending of fact and fiction would be ill-served by further summary, but Ash, Zarin, Wally and Anjuli play out an epic drama. Who cares to admit to infatuation, to having fallen for the old Dickensian virtues of storytelling? Shelves are haunted by the dusty ghosts of so many "unforgettable" sagas, yet it would be churlish as well as thoroughly craven not to admit that this novel, with its unabashed vigor, has genuine power.

A second reading relieves the intense pressure to discover the fate of the protagonists, allowing hundreds of details and transient characters previously unnoticed to fill out the huge canvas. In the simplest terms, readers of The Far Pavilions cannot ever feel quite the same about either the Indian subcontinent or the decrepit history of the British Empire. Few novels can claim as much, or ask for more.