Sayyiduna Jabir bin Abdullah (may Allah be pleased with him) and Sayyiduna Abu Hurayrah (may Allah be pleased with him) both say that the Messenger of Allah (peace and blessings be upon him) said: "I have been commanded to fight the people until they say 'La ilaha illallah' (There is no god worthy of worship except Allah). When they say this word, they have protected their wealth and their blood from me, except by its right, and their reckoning is with Allah."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5140