Sayyiduna Anas bin Malik (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "I have been commanded to fight the polytheists until they testify that there is no god except Allah and that Muhammad (peace and blessings be upon him) is the Messenger of Allah. When they have testified that there is no god except Allah and that Muhammad (peace and blessings be upon him) is the Messenger of Allah, prayed as we pray, faced our qiblah and eaten our slaughtered animals, then their wealth and their blood are forbidden to us, except by its right. For him are the same rulings as for a Muslim, and upon him is the same as is upon any Muslim."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5142