Did the Prophet say he was ordered to fight people until they say there is no god but Allah?

Peace, war, jihad and violenceQuran · 4Sources · 3

Short answer

Yes, the hadith is in Sahih al-Bukhari, and it is often quoted. Classical scholars explained it in different ways, and many took it to be about the idol-worshippers of Arabia who were at war with the Muslims, and not about every person on earth. The Quran itself says there is no compulsion in religion, and the Prophet ﷺ is told he is only a reminder.

The fuller answer

The report says: 'I was ordered to fight the people until they testify that there is no god but Allah and that Muhammad is the Messenger of Allah, establish prayer and pay zakat. If they do so, their lives and property are safe from me, except for what Islam's right requires, and their reckoning is with Allah.' Classical scholars such as al-Khattabi (in his Ma'alim al-Sunan) explained that 'the people' here means the idol-worshippers of Arabia and not the People of the Book, and the Arabic word al-nas is used for a specific group elsewhere, as in 3:173. Those idolaters had fought the Muslims for years.

Other texts fix the meaning. The Quran says 'there is no compulsion in religion' and tells the Prophet ﷺ, 'you are not a controller over them'. The Prophet himself signed the treaty of Hudaybiyyah with the idol-worshippers of Mecca, and, as the biographies report, made agreements with Jewish and Christian communities that did not require them to change faith. He warned that whoever kills a person under such a covenant will not smell the fragrance of Paradise. The last phrase of the hadith, 'their reckoning is with Allah', shows that the final judgment on a person's heart is left to Allah.

To be honest, classical legal books did describe the call to Islam followed by the choice of paying jizya or fighting, in the setting of the wars between empires. Many scholars today read the sources as a law of war within that historical context, and they hold that Muslims who live in peace with others under agreements have no right to fight anyone over his beliefs. Scholars differ in how they explain the hadith, but the Quran is clear that no one can be forced to believe. Muslims invite to Islam with words, and the answer belongs to the listener.

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.

فَذَكِّرْ إِنَّمَآ أَنتَ مُذَكِّرٌۭ ﴿٢١﴾ لَّسْتَ عَلَيْهِم بِمُصَيْطِرٍ ﴿٢٢﴾

Remind them, for thou art but a remembrancer, Thou art not at all a warder over them.

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

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

ٱلَّذِينَ قَالَ لَهُمُ ٱلنَّاسُ إِنَّ ٱلنَّاسَ قَدْ جَمَعُوا۟ لَكُمْ فَٱخْشَوْهُمْ فَزَادَهُمْ إِيمَٰنًۭا وَقَالُوا۟ حَسْبُنَا ٱللَّهُ وَنِعْمَ ٱلْوَكِيلُ ﴿١٧٣﴾

Those unto whom men said: Lo! the people have gathered against you, therefor fear them. (The threat of danger) but increased the faith of them and they cried: Allah is Sufficient for us! Most Excellent is He in Whom we trust!

Sources