Gandhi claimed to “understand the longing of a Jew to return to Palestine,” but warned Zionists against doing so “under the shadow of the British gun.” As early as 1946, Nehru, then prime-minister-in-waiting, sacrificed India’s lucrative trade links with South Africa in protest against apartheid. In 1947, India voted at the United Nations against the partition of Palestine because, Nehru explained to Albert Einstein, the Zionists had “failed to win the good will of the Arabs.” Distrustful of American motives, Nehru spurned a potentially rewarding partnership with the United States during the Cold War.

But Indian leaders very seldom practiced domestically what they preached internationally. Though committed to parliamentary procedures, Nehru never let go of the British-created colonial state and its well-oiled machinery of repression. The brute power of the Indian police and army was used in 1948 to corral the princely state of Hyderabad into the Indian Union. Up to 40,000 Muslims were killed, and the episode remains the single-largest massacre in the history of independent India.

Nehru shared with Hindu nationalists a mystical faith in the essential continuity of India from ancient civilization to modern nation. Determined to hold on to Kashmir, for example, he abandoned his promise of organizing a referendum to decide the contested region’s political status. In 1953, he deposed a popular Kashmiri politician (and friend) and had him sent to prison, inaugurating a long reign of puppet leaders who continue to enrich themselves under the long shadow of the Indian gun.

As early as 1958, Nehru’s regime introduced the Armed Forces Special Powers Act, the forerunner of repressive legislation that today sanctions murder, torture and rape by Indian soldiers in central India and border provinces. It was under Nehru that Indian troops and paramilitaries were unleashed on indigenous peoples in India’s northeastern states in the 1950s and ’60s. It was Nehru who in 1961 made it a crime to question the territorial integrity of India, punishable with imprisonment.

Yet in the eyes of the world, India maintained its exceptional status for decades, as many promising postcolonial experiments with democracy degenerated into authoritarianism, if not military rule. The country’s democratic politics appeared stable. But they did so only because they were reduced to the rule of a single party, the Congress, which was itself dominated by a single family — Nehru’s. And far from being socialist or redistributionist, Nehru’s economic policies boosted India’s monopoly capitalists. His priorities were heavy industries and elite polytechnics, which precluded major investments in primary education, health and land reform.

The Congress’s reliance on reactionary upper-caste Hindus also prevented the very possibility of emancipatory politics for dalits until the early 1990s. (It was those upper-caste Hindus, incidentally, who were the first in the republic’s history to ban cow slaughter, in several states in the 1950s.) By the 1980s — after Nehru had been replaced by his daughter, Indira Gandhi, at the helm of both the Congress and the country — the party had chosen Hindu majoritarianism, and hostility to Muslims and Sikhs, as the low road to electoral success. It was a nasty and dangerous strategy, which emboldened extremists on all sides. Many more people died in the Congress-led anti-Sikh pogrom of 1984 than in the 2002 massacre of Muslims in Gujarat that Modi is accused of supervising while he was the state’s chief minister.

India’s lynch mobs today represent the latest and most grisly expression of such cynical political ideologies. As the sheer brutishness of Mr. Modi’s populism becomes clear, the memory of the aristocratic Nehru becomes more sacred, especially among politicians and commentators from India’s English-speaking upper castes. But Mr. Modi has also turned that legacy of high-flown promises to his political advantage.