Anas bin Malik reported,

The Prophet ﷺ said, "I have been commanded to fight the polytheists until they bear witness that there is no god but Allah and that Muhammad is His servant and Messenger. Once they bear witness that there is no god but Allah and that Muhammad is His servant and Messenger, pray our prayer, face our qiblah, and eat what we have slaughtered, their blood and property become forbidden to us, except by its rightful claim."

Nasai 3971

Sahih

أخبرنا هارون بن محمد بن بكار بن بلال عن محمد بن عيسى وهو ابن سميع قال حدثنا حميد الطويل

عن أنس بن مالك

عن النبي ﷺ قال أمرت أن أقاتل المشركين حتى يشهدوا أن لا إله إلا الله وأن محمدا عبده ورسوله فإذا شهدوا أن لا إله إلا الله وأن محمدا عبده ورسوله وصلوا صلاتنا واستقبلوا قبلتنا وأكلوا ذبائحنا فقد حرمت علينا دماؤهم وأموالهم إلا بحقها

النسائي 3971صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Prohibition of bloodshed
Chapter
Prohibition of bloodshed
Numbering
Darussalam 3971
Nasai 3971