Then came Lord Cornwallis, architect of the apartheid familiar to readers of Kipling, when a touch of Indian blood in a wife could damage a man’s career. As Governor-General of India from 1786 to 1793, Cornwallis took the decision to exclude Indians from all senior positions in the army and the administration. The two sides came to observe each other across an abyss of misunderstanding. “As soon as the English mind came in contact with the Hindu mind, it completely lost its temper, and so became incapable of dispassionate analysis,” observed the Bengali writer Nirad Chaudhuri in 1967.

The Indian Mutiny of 1857-58 was another watershed. After it came the Raj, with direct rule from London, a viceroy representing the monarch and the formation of the Indian Civil Service, a band of 1,000-odd men who ruled over India’s 250 districts, each with an average size greater than Norfolk and Suffolk combined. This was the beginning of British India as most people think of it – tiger shoots, bungalows, native bearers and regimental “Weeks”.

The linchpin of government was the District Officer. He would tour with a train of up to 20 men (“Hindu coolies sometimes refused to carry even Oxo cubes because of the bull’s head on the packet, so that taking a small flock of sheep and hiring a Muslim butcher was often the best option,” writes Gilmour), trying cases, inspecting drains, wells and schools, choosing which areas should be saved when fires broke out or floods rose, trying to deal with locusts, infestations of water hyacinth, famine and bubonic plague. His most constant companion was loneliness. 

Planters, of both indigo and tea, led an even more solitary life. A disproportionate number were Scots, employed by the Glaswegian tea firm of James Finlay Co. “‘Mac’ would begin his career, and perhaps also his married life, in a decrepit bungalow with sparse wooden furniture,” writes Gilmour, “surrounded by jungle, with his nearest British neighbours five or six miles away along hill paths and the nearest club even more distant.” On their rare social evenings, planters were known for their rowdiness. It was not an enticing prospect for a wife. “I quite dread your being depressed by the monotony of India,” wrote one planter, Walter Ritchie, to his fiancée Augusta, in 1845, three years after he had last seen her.

In the summer, those who could flocked to the hills, notably to Simla (now Shimla), for six months the seat of government, which traipsed 1,200 miles from Calcutta, first by bullock cart, then by train and finally pony cart. In Kipling’s day, this small, English-looking town 7,000ft up in the mountains became famous not only for its climate but for its extra-marital affairs. As one vicereine observed, it was “a place where every Jack has someone else’s Jill”.

Often these liaisons were between “grass widows”, whose husbands were still in their posts, and young officers on leave – hardly a surprising state of affairs, since in both the army and the Indian Civil Service, marriage was practically forbidden until a man was 30. One Frontier regiment, the Tochi Scouts, was so dangerous that it only accepted bachelor officers. In fact, it is difficult to escape the conclusion that on the whole the authorities disapproved of marriage – especially British-Indian ones. 

A man who married an Indian girl not only could not take her to lunch in his club; he could find himself banished to an unpleasant district and his wife high-hatted by the British memsahibs. The Anglo-Indian daughters of such unions often married – or tried to marry – Englishmen, insisting that if their skin was slightly darker than normal, it was because they had a Spanish grandmother.

Snobbery was rife because, at the height of the Raj, everything was hyper-British, reflecting a Britain that in reality had only existed 20 years earlier, if ever. There was a slavish regard for etiquette. A newcomer had to go around leaving his card (engraved, not printed) at every British home in the station. When the bank manager at Lyallpur in the Twenties received an invitation to dinner from the District Officer, he declined it, because a newcomer, also invited, “had not had the courtesy to call on us [so] we would prefer not to meet him”. Inside the porch of Government House, the ADCs kept a box of long, white kid gloves for ladies who had forgotten to bring their own to a viceregal dance; the husbands of those who had omitted stockings, too, were telephoned in the morning and told to issue a reprimand.

Gilmour captures this peculiar existence in elegant prose and superbly evocative photographs. Both are sadly lacking in another new book, Christopher Lee’s Viceroys: The Creation of the British (★★☆☆☆), from which only the stiffly posed portraits of notables gaze out at us. Nor do we hear of the glamour and strangeness of the lives led by these 20 viceroys, from Canning to Mountbatten, who ruled over more subjects than the sovereign for whom they deputised, swathed in a pomp and magnificence unknown at home but still bedevilled by dust, insects and prickly heat. 

Instead, Lee gives us a detailed history of the British in India from the foundation of the East India Company to the final departure of the British in 1947. Indeed, the first mention of a viceroy only comes a third of the way into the book, a large part of which is taken up by the actions and intrigues of those in government at home.

A more serious complaint is that Lee, best known for his radio series This Sceptred Isle, has been very badly served by his editor. I quote: “If that sounds as if it could have been different, the answer is that the British did go to establish a Raj but when they came to govern a Raj for 200 years or so, through them India had become a different subcontinent with a structure of its society, real and not imagined enemies without and within and for the first time an attempt at one ruling structure and, just as the rule of the princes had produced often terrible ways of government and living far worse than the British rule, so an intermediary Indian bureaucracy had in itself produced a significant moment in the history of rule in India that…” but it is too cruel to go on.

Yet behind the clunking prose and the eccentric interpolations (what does the Schleswig-Holstein question of 1848 have to do with India’s viceroys?) lurk interesting points. In the 18th century, when the East India Company’s sole motivation was to increase its profits, did Britain theoretically have the political structure to do anything more for India, let alone take over its governing, as it did after the Mutiny?

Lee lingers on the huge, unbridgeable gap between the haves and the have-nots, rightly pointing out that in the Durbar of 1877, when the viceroy, Lord Lytton, sat on his throne for three days receiving the salutes and obeisance of the Indian princes, the three-year Great Madras Famine was starving more than five million Indians to death. But, like them, Lee’s book contains only the bare bones of history, minus any of the flesh and blood.

The British  in India by David Gilmour 640pp, Allen Lane,  £30, ebook £12.99

Viceroys by Christopher Lee 432pp, Constable,  £30, ebook £14.99

Alternatively, if you wish to purchase any other books, please visit the online Telegraph Bookshop or call 0844 871 1514