During those decades of the 20th century when communist regimes in Russia, Eastern Europe and elsewhere seemed to be thriving, constituting sources of inspiration for Western leftists and prompting fear and loathing on the part of conservatives, communism was frequently compared with Islam.
For example, the French thinker Jules Monnerot made such a comparison in his Sociologie du communisme (1949).
A case can certainly be made that ideologies like Marxism-Leninism operate like religions, albeit without the supernatural dimension. In particular, there is a strong in-group/out-group dynamic and a sense that there is an essential truth at the heart of the ideology, the total acceptance of which is a prerequisite for being counted amongst the faithful.
But why single out Islam as a point of comparison - why not any religion? Basically because, like Marxism-Leninism, Islam has a detailed plan for a universal and supposedly egalitarian social order. Islam, writes Monnerot, "draws on resentments, and organizes and streamlines the impulses that set men against the societies in which they are born."
Just as, claims Monnerot, communists deployed an "historical myth" which was "apt to fanaticize men", so too did the Fatimids of Egypt and the Safavids of Persia.
For Monnerot, Stalin was like the Muslim "commander of the faithful". In communism, as in Islam, "the believer does not think of himself as a 'believer': he is in possession of the truth - or, better put, he takes the thing that possesses him for the truth. This truth inspires in him an active attachment that truth, in a scientific sense, doesn't inspire and never asks for."
Modernity is characterized by relatively autonomous spheres of activity and relatively autonomous institutions coexisting and creating a complex society in which there is space for individual privacy and freedom.
Communism, by contrast, is a "total social phenomenon" that breaks with the "autonomy of spheres of action" characteristic of modernity. And radical political Islam or Islamism may be characterized in a similar way.
Monnerot's mention of the "resentments" that Islam putatively draws on to feed subversive impulses recalls another (related) tradition of European social thought which associates populist radicalism with Jewish and Christian traditions. But that is another story ...