It was narrated that Abu Hurairah said:
The Messenger of Allah [SAW] said: 'I have been commanded to fight the people until they say La ilaha illallah. If they say it then their blood and their wealth are safe from me, except for a right that is due, and their reckoning will be with Allah.' When the people apostatized, 'Umar said to Abu Bakr: 'Will you fight them when you heard the Messenger of Allah [SAW] say such and such?' He said: 'By Allah, I do not separate Salah and Zakah, and I will fight whoever separates them.' So we fought alongside him, and we realized that that was the right thing.