Pan-Islamism (اتّحاد الاسلام) is a political movement advocating the unity of Muslims under one Islamic state or a Caliphate. While Pan-Arabism advocates the unity and independence of Arabs regardless of religion, pan-Islamism advocates the unity and independence of Muslims regardless of ethnicity.
In the modern era, Jamal al-Din al-Afghani promoted unity among Muslims to resist colonial occupation of Muslim lands. Al-Afghani's policies were highly progressive according to grad student Danielle Costa:
Afghani believed that to live in the modern world demanded changes in Muslim ways of organizing society, and that it must try to make those changes while remaining true to itself. Islam, Afghani believed, was not only compatible with reason, progress and social solidarity, the bases of modern civilization, but if properly interpreted it positively enjoined them.
While Afghani's interest in Islamic law and theology was scant, later Pan-Islamism in the post-colonial world was strongly associated with Islamism. Leading Islamists such as Sayyid Qutb, Abul Ala Maududi, and Ayatollah Khomeini all stressed their belief that a return to traditional Sharia law would make Islam united and strong again.
In the period of decolonialism following World War II, nationalism overshadowed Islamism. In the Arab world secular pan-Arab parties - Baath and Nasserist parties - had offshoots in almost every Arab country, and took power in Egypt, Libya, Iraq and Syria. Islamists suffered severe repression; it's major thinker Syed Qutb, was imprisoned, underwent torture and was later executed.
Following the stunning defeat of Arab armies in the Six-Day War, Islamism and Pan-Islam began to reverse their releative position of popularity with nationalism and pan-Arabism. In 1979 the Iranian Revolution ousted Shah Mohammad Reza Pahlavi from power, and ten years later the Afghan Muslim mujahideen successfully forced the Soviet Union from Afghanistan. These events galvanised Islamists the world over and heightened their popularity with the Muslim public. Throughout the Middle-East, and in particular Egypt, the various branches of the Muslim Brotherhood have significantly challenged the secular nationalist or monarchical Muslim governments. In Pakistan the Jamaat-e-Islami enjoyed popular support especially since the formation of the MMA, and in Algeria the FIS was expected to win the cancelled elections in 1992. Since the collapse of the Soviet Union, Hizb-ut-Tahrir has emerged as a Pan-Islamist force in Central Asia and in the last five years has developed some support the Arab world.