The Messenger of Allah ﷺ said, "I have been commanded to fight the people until they bear witness that there is no god but Allah and that Muhammad is the Messenger of Allah, and until they establish the prayer and pay the zakat. If they do that, their lives and property are protected from me, except for what Islam rightfully requires, and their reckoning is with Allah."
أن رسول الله ﷺ قال: أمرت أن أقاتل الناس حتى يشهدوا أن لا إله إلا الله، وأن محمدا رسول الله، ويقيموا الصلاة ويؤتوا الزكاة، فإذا فعلوا ذلك عصموا مني دماءهم وأموالهم إلا بحق الإسلام، وحسابهم على الله.
Bukhari related it in the Book of Faith (25), and Muslim in the Book of Faith (22:36), both of them through the route of Shubah, from Waqid bin Muhammad bin Zayd bin Abdullah bin Umar, who said, "I heard my father narrating from Ibn Umar," and he mentioned it.