Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Prophet (peace and blessings be upon him) said: "I have been commanded to keep fighting people until they bear witness that there is no god but Allah. When they bear witness that there is no god but Allah and believe in the law I have brought, they have protected their lives from me, except by the right of Islam, and their reckoning is with Allah."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الظهار / 15270