Was Islam spread by the sword?

History, sects and Muslims todayQuran · 2Sources · 2

Short answer

Muslim armies conquered territory in the first century of Islam, as empires did in that age, but conquest and conversion are different. Most people in the conquered lands became Muslim gradually over centuries, and the world's largest Muslim country, Indonesia, was reached by traders and teachers, not by an army.

The fuller answer

The Quran forbids forcing people into religion. In Egypt, Syria and Iraq, Muslims remained a minority for several centuries after the conquests, and Christian, Jewish and Zoroastrian communities survived and flourished under Muslim rule. If the conversions had been forced, there would be no Christians left in the Middle East. Islam spread in Southeast Asia, West Africa and East Africa mainly through merchants, scholars and Sufi teachers.

Islam was and is also the fastest-growing major religion in several countries today, where there is no army. Still, historians acknowledge that there was political pressure in some times and places, such as higher taxes for non-Muslims. The question is how far the rulers' conduct reflects the religion, and in Muslim teaching, forced conversion is invalid.

From the Quran

لَآ إِكْرَاهَ فِى ٱلدِّينِ ۖ قَد تَّبَيَّنَ ٱلرُّشْدُ مِنَ ٱلْغَىِّ ۚ فَمَن يَكْفُرْ بِٱلطَّٰغُوتِ وَيُؤْمِنۢ بِٱللَّهِ فَقَدِ ٱسْتَمْسَكَ بِٱلْعُرْوَةِ ٱلْوُثْقَىٰ لَا ٱنفِصَامَ لَهَا ۗ وَٱللَّهُ سَمِيعٌ عَلِيمٌ ﴿٢٥٦﴾

There is no compulsion in religion. The right direction is henceforth distinct from error. And he who rejecteth false deities and believeth in Allah hath grasped a firm handhold which will never break. Allah is Hearer, Knower.

وَلَوْ شَآءَ رَبُّكَ لَءَامَنَ مَن فِى ٱلْأَرْضِ كُلُّهُمْ جَمِيعًا ۚ أَفَأَنتَ تُكْرِهُ ٱلنَّاسَ حَتَّىٰ يَكُونُوا۟ مُؤْمِنِينَ ﴿٩٩﴾

And if thy Lord willed, all who are in the earth would have believed together. Wouldst thou (Muhammad) compel men until they are believers?

Sources