The Messenger of Allah ﷺ said, "I have been commanded to fight the people until they say there is no god but Allah. Once they say it, they have protected their lives and property from me, except for what is rightfully due, and their reckoning is with Allah."
حدثنا هناد حدثنا أبو معاوية عن الأعمش عن أبي صالح
قال رسول الله ﷺ أمرت أن أقاتل الناس حتى يقولوا لا إله إلا الله فإذا قالوها منعوا مني دماءهم وأموالهم إلا بحقها وحسابهم على الله
Chapter of citation. Muslim also narrated it, Faith, chapter on the command to fight people until they say, "There is no god but Allah, Muhammad is the Messenger of Allah" etc., no. 21, from the hadith of Amash with the same wording. Bukhari narrated it, no. 1399, from the hadith of Abu Hurairah On this subject there are also narrations from Jabir [to come, 3341], Abu Saeed [I did not find it], and Ibn Umar [Bukhari, no. 250, and Muslim, no. 22].