This week, the National Archives here in New Delhi released a set of letters between Mohandas Karamchand Gandhi and a close friend from his South African days, Hermann Kallenbach, a German Jewish architect. Cue a set of ludicrous "Gay Gandhi" headlines across the world, wondering whether the fact the Mahatma signed some letters "Sinly yours" might be a clue (seemingly unaware that "sinly" was once a common contraction of "sincerely").
The origin of this rumour was a mischievous book review two years ago written by the historian Andrew Roberts, which speculated about the relationship between the men. On the basis of the written evidence, it seems unlikely that their friendship in the years leading up to the First World War was physical.
Gandhi is one of the best-documented figures of the pre-electronic age. He has innumerable biographies. If he managed to be gay without anyone noticing until now, it was a remarkable feat. The official record of his sayings and writings runs to more than 90 volumes, and reveals that his last words before being assassinated in 1948 were not an invocation to God, as is commonly reported, but the more prosaic: "It irks me if I am late for prayers even by a minute."
That Gandhi had an eccentric attitude to sleeping habits, food and sexuality, regarding celibacy as the only way for a man to avoid draining his "vital fluid", is well known. Indeed, he spoke about it at length during his sermons, once linking a "nocturnal emission" of his own to the problems in Indian society.
According to Jawaharlal Nehru, independent India's first prime minister, Mahatma Gandhi's pronouncements on sex were "abnormal and unnatural" and "can only lead to frustration, inhibition, neurosis, and all manner of physical and nervous ills… I do not know why he is so obsessed by this problem of sex".
Although some of Gandhi's unconventional ideas were rooted in ancient Hindu philosophy, he was more tellingly a figure of the late Victorian age, both in his puritanism and in his kooky theories about health, diet and communal living. Like other epic figures from the not too distant past, such as Leo Tolstoy and Queen Victoria, he is increasingly perceived in ways that would have surprised his contemporaries. Certainly no contemporary Indian politician would dare to speak about him in the frank tone that his ally Nehru did.
Gandhi has become, in India and around the globe, a simplified version of what he was: a smiling saint who wore a white loincloth and John Lennon spectacles, who ate little and succeeded in bringing down the greatest empire the world has ever known through non-violent civil disobedience. President Obama, who kept a portrait of Gandhi hanging on the wall of his Senate office, likes to cite him.
An important origin of the myth was Richard Attenborough's 1982 film Gandhi. Take the episode when the newly arrived Gandhi is ejected from a first-class railway carriage at Pietermaritzburg after a white passenger objects to sharing space with a "coolie" (an Indian indentured laborer). In fact, Gandhi's demand to be allowed to travel first-class was accepted by the railway company. Rather than marking the start of a campaign against racial oppression, as legend has it, this episode was the start of a campaign to extend racial segregation in South Africa. Gandhi was adamant that "respectable Indians" should not be obliged to use the same facilities as "raw Kaffirs". He petitioned the authorities in the port city of Durban, where he practised law, to end the indignity of making Indians use the same entrance to the post office as blacks, and counted it a victory when three doors were introduced: one for Europeans, one for Asiatics and one for Natives.
Gandhi's genuine achievement as a political leader in India was to create a new form of protest, a mass public assertion which could, in the right circumstances, change history. It depended ultimately on a responsive government. He figured, from what he knew of British democracy, that the House of Commons would only be willing to suppress uprisings to a limited degree before conceding. If he had faced a different opponent, he would have had a different fate. When the former Viceroy of India, Lord Halifax, saw Adolf Hitler in 1938, the Fuhrer suggested that he have Gandhi shot; and that if nationalist protests continued, members of the Indian National Congress should be killed in increments of 200.
For other Indian leaders who opposed Gandhi, he could be a fiendish opponent. His claim to represent "in his person" all the oppressed castes of India outraged the Dalit leader Dr BR Ambedkar. Gandhi even told him that they were not permitted to join his association to abolish untouchability. "You owe nothing to the debtors, and therefore, so far as this board is concerned, the initiative has to come from the debtors." Who could argue with Gandhi the lawyer? The whole object of this proposal, Ambedkar responded angrily, "is to create a slave mentality among the Untouchables towards their Hindu masters".
Although Gandhi may have looked like a saint, in an outfit designed to represent the poor of rural India, he was above all a wily operator and tactician. Having lived in Britain and South Africa, he was familiar with the system that he was attempting to subvert. He knew how to undermine the British, when to press an advantage and when to withdraw. Little wonder that one British provincial governor described Mr Gandhi as being as "cunning as a cartload of monkeys".
Patrick French is the author of India: A Portrait (Vintage)