As the march of events has lurched in unexpected directions over the past three decades, many a political thinker has been thrown off track and hurled into confusion, if rarely into silence. But not John Gray. He has usually been a little ahead of the zeitgeist, waxing contrarian about whatever consensus is about to form. Gray has been called a chameleon. If so, he belongs to a very peculiar species: one with precognition, able to change colors before landing on whatever patch of landscape lies just around the corner.

In the early 1980s, Gray, who teaches European thought at the London School of Economics, was the most capable defender of Friedrich von Hayek as a social philosopher rather than just a propagandist for free-market policy. But he later became decidedly critical of any notion that the future belonged to liberal democracy. In 1989, as the Soviet Union was reforming itself out of existence, he wrote that this would not inaugurate “a new era of post-historical harmony” but rather “a return to the classical terrain of history, a terrain of great-power rivalries, secret diplomacies, and irredentist claims and wars.” Over the following decade, he advanced a critique of globalization that sounded, at times, profoundly anticapitalist, if by no means Marxian.

Such an ideological itinerary seems like a calculated effort to lose friends. But whatever its twists and turns, Gray’s thought has in fact been remarkably consistent, with his journalistic writings simply framing, in the most provocative possible way, theses that have accumulated in more sedate works like “Enlightenment’s Wake” (1995) and “Two Faces of Liberalism” (2000). His latest book, “Black Mass: Apocalyptic Religion and the Death of Utopia,” treats fundamentalist Islam and Western triumphalism as similar and related phenomena. This argument revisits themes Gray developed in “Straw Dogs,” a volume of pensées originally published in 2002 and now reissued in paperback by Farrar, Straus & Giroux.

“‘Humanity’ does not exist,” he announced in “Straw Dogs.” “There are only humans, driven by conflicting needs and illusions, and subject to every kind of infirmity of will and judgment.” This may be the key to all of Gray’s thought, and it is no accident that he echoes Margaret Thatcher’s famous statement that there is no such thing as society. (As she put it, “there are individual men and women, and there are families” — but nothing else.) The irreducible plurality of human “needs and illusions,” Gray argues, means it is utopian to imagine that any single kind of political or social order could ever be good for everyone. “If there is such a thing as spontaneous social evolution,” he writes in “Black Mass,” “it produces institutions of many kinds.”