Sahih Muslim 21 b
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
أُمِرْتُ أَنْ أُقَاتِلَ النَّاسَ حَتَّى يَشْهَدُوا أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَيُؤْمِنُوا بِي وَبِمَا جِئْتُ بِهِ فَإِذَا فَعَلُوا ذَلِكَ عَصَمُوا مِنِّي دِمَاءَهُمْ وَأَمْوَالَهُمْ إِلاَّ بِحَقِّهَا وَحِسَابُهُمْ عَلَى اللَّهِ "
It is reported on the authority of Abu Huraira that he heard the Messenger of Allah say:
I have been commanded to fight against people, till they testify to the fact that there is no god but Allah, and believe in me (that) I am the messenger (from the Lord) and in all that I have brought. And when they do it, their blood and riches are guaranteed protection on my behalf except where it is justified by law, and their affairs rest with Allah.
Full reference and source
Sahih Muslim 21 b In-book : Book 1, Hadith 34 USC-MSA web (English) : Book 1, Hadith 31 (deprecated)
View source on Sunnah.com (opens in a new tab)