The Messenger of Allah ﷺ said, "I have been commanded to fight people until they say, 'There is no god but Allah.' Whoever says, 'There is no god but Allah' has protected his life and property from me, except for what is due upon them, and his reckoning rests with Allah."
قال رسول الله ﷺ: أمرت أن أقاتل الناس حتى يقولوا: لا إله إلا الله، فمن قال: لا إله إلا الله فقد عصم منى نفسه وماله إلا بحقه وحسابه على الله.
Bukhari narrated it in Jihad and Expeditions (2946), and Muslim in Faith (21), both through Zuhri, who said, "Saeed bin Musayab told me that Abu Hurairah informed him," and he related it.