While on holiday in Berlin, the German diplomat, Eberhard von Stohrer, decided to spend his time thinking about the Muslim world. He had served as an ambassador in Cairo, where he observed that by fighting Britain and France, Germany had gained an "outstanding position" in the "eyes of the Muslims". It was time to cement the relationship between Islam and National Socialist ideology.

Stohrer's memorandum of 18 November 1941 launched "an extensive Islam programme" and established Nazi Germany's attitude to Muslims. Islam was "similar to National Socialism" Stohrer suggested. Both shared the values of obedience to the leader, belief in the family, and commitment to war. As a "de facto fanatic", the Muslim could easily be persuaded to join hands with the Nazis. Besides, the Führer "already holds a pre-eminent position" in Islam because of his "fight against Judaism".

Nazi propaganda, as David Motadel illustrates in his extensively researched book, may have been crude but it was effective. Within a few months Muslim SS units had been created and the German Foreign Office had established the Islamic Central Institute in Berlin. Muslim scholars were recruited to spread the message of Nazi ideology to Muslim lands.

Among the first to be employed by the German Foreign Office was Amin al-Husayni, the flamboyant Mufti of Jerusalem. He moved to Berlin and received an audience with the Führer. Another was Alimjan Idris, who was asked to translate Mein Kampf into Persian and was sent to the Soviet Union to persuade Muslim students to study in Germany. Both al-Husayni and Idris were aggressively anti-semitic and liberally used religious rhetoric to justify their positions and promote the Nazi cause.

The popular Islamic revivalist movements, such as the Muslim Brotherhood, were also quite receptive. The Brotherhood accepted financial support from Germany; and many of its members openly supported Nazi propaganda. But on the whole, traditional Muslim scholars were not duped by the Nazis. Even when it became clear that the colonial powers were not keen on granting the Muslims in the Middle East, Africa and Asia the right of self-determination, they rejected the idea of an alliance with the Germans.

Nevertheless, hundreds of thousands of Muslim soldiers were lured into the German army in the belief that they were fighting in the name of Islam to liberate their countries. Muslims from Albania, Bosnia, and Crimea formed special units of the Waffen-SS; and were given special privileges to practice their religion. But not all recruits accepted the Nazi ideology, even though they prayed under the swastika. Many, Motadel points out, were motivated simply by material interests. For prisoners captured on the Russian front, for example, it seemed an attractive alternative to the appalling conditions of the camp. Recruits from the Balkans and the Crimea hoped to protect their villages from partisans and bandits.

Motadel's treatment of an unsavoury segment of modern Muslim history is as revealing as it is nuanced. Its strength lies not just in its erudite account of the Nazi perception of Islam but also in illustrating how the Allies used exactly the same tactics to rally Muslims against Hitler. With the spectre of Isis haunting the world, it contains lessons from history we all need to learn.