Sahih al-Bukhari 392
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
أُمِرْتُ أَنْ أُقَاتِلَ النَّاسَ حَتَّى يَقُولُوا لاَ إِلَهَ إِلاَّ اللَّهُ. فَإِذَا قَالُوهَا وَصَلَّوْا صَلاَتَنَا، وَاسْتَقْبَلُوا قِبْلَتَنَا، وَذَبَحُوا ذَبِيحَتَنَا، فَقَدْ حَرُمَتْ عَلَيْنَا دِمَاؤُهُمْ وَأَمْوَالُهُمْ إِلاَّ بِحَقِّهَا، وَحِسَابُهُمْ عَلَى اللَّهِ "
Narrated Anas bin Malik:
Allah's Messenger (ﷺ) said, "I have been ordered to fight the people till they say: 'None has the right to be worshipped but Allah.' And if they say so, pray like our prayers, face our Qibla and slaughter as we slaughter, then their blood and property will be sacred to us and we will not interfere with them except legally and their reckoning will be with Allah."
Full reference and source
Sahih al-Bukhari 392 In-book : Book 8, Hadith 44 USC-MSA web (English) : Vol. 1, Book 8, Hadith 387 (deprecated)
View source on Sunnah.com (opens in a new tab)