Since Mr. Naipaul defined it, the apocalyptic Indian imagination has been enriched by the exploits of Hindu nationalists, such as the destruction in 1992 of the 16th-century Babri Masjid mosque, and the nuclear tests of 1998. Celebrating the tests in speeches in the late 1990s, including one entitled “Ek Aur Mahabharata” (One More Mahabharata), the then head of the Rashtriya Swayamsevak Sangh (the National Volunteers Association, or R.S.S), the parent outfit of Hindu nationalists, claimed that Hindus, a “heroic, intelligent race,” had so far lacked proper weapons but were sure to prevail in the forthcoming showdown with demonic anti-Hindus, a broad category that includes Americans (who apparently best exemplify the worldwide “rise of inhumanity”).

A Harvard-trained economist called Subramanian Swamy recently demanded a public bonfire of canonical books by Indian historians — liberal and secular intellectuals who belong to what the R.S.S. chief in 2000 identified as that “class of bastards which tries to implant an alien culture in their land.” Denounced by the numerous Hindu supremacists in social media as “sickular libtards” and sepoys (the common name for Indian soldiers in British armies), these intellectuals apparently are Trojan horses of the West. They must be purged to realize Mr. Modi’s vision in which India, once known as the “golden bird,” will “rise again.”

Mr. Modi doesn’t seem to know that India’s reputation as a “golden bird” flourished during the long centuries when it was allegedly enslaved by Muslims. A range of esteemed scholars — from Sheldon Pollock to Jonardon Ganeri — have demonstrated beyond doubt that this period before British rule witnessed some of the greatest achievements in Indian philosophy, literature, music, painting and architecture. The psychic wounds Mr. Naipaul noticed among semi-Westernized upper-caste Hindus actually date to the Indian elite’s humiliating encounter with the geopolitical and cultural dominance first of Europe and then of America.

These wounds were caused, and are deepened, by failed attempts to match Western power through both mimicry and collaboration (though zealously anti-Western, Chinese nationalism has developed much more autonomously in comparison). Largely subterranean until it erupts, this ressentiment of the West among thwarted elites can assume a more treacherous form than the simple hatred and rejectionism of outfits such as Al Qaeda, the Islamic State and the Taliban. The intellectual history of right-wing Russian and Japanese nationalism reveals an ominously similar pattern as the vengeful nativism of Hindu nationalists: a recoil from craving Western approval into promoting religious-racial supremacy.

The Russian elite, created by the hectic Westernizing ventures of Peter the Great, was the first to articulate the widespread sense of inadequacy and failure created in societies trying to catch up with the modern West. In 1836, Pyotr Chaadaev argued in “First Philosophical Letter” that, “We belong neither to the West nor to the East, and we possess the traditions of neither.” His eloquent self-pity, which shook up Pushkin as well as Gogol and Tolstoy, inaugurated the semi-Westernized Russian elite’s tormented search for a native identity to uphold against the West.