Anas bin Malik reported,

The Messenger of Allah ﷺ said, "Three things are among the foundations of faith. Refraining from harming whoever says 'There is no god but Allah,' not declaring him an unbeliever for any sin, and not expelling him from Islam for any deed. Jihad continues from the time Allah sent me until the last of my community fights the Dajjal, neither nullified by the tyranny of a tyrant nor by the justice of a just ruler. And belief in the divine decrees."

Abu Dawud 2532

Daif

حدثنا سعيد بن منصور حدثنا أبو معاوية حدثنا جعفر بن برقان عن يزيد بن أبي نشبة

عن أنس بن مالك قال

قال رسول الله ﷺ ثلاث من أصل الإيمان الكف عمن قال لا إله إلا الله ولا نكفره بذنب ولا نخرجه من الإسلام بعمل والجهاد ماض منذ بعثني الله إلى أن يقاتل آخر أمتي الدجال لا يبطله جور جائر ولا عدل عادل والإيمان بالأقدار

أبو داود 2532ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Jihad
Chapter
Warfare with unjust rulers
Numbering
Darussalam 2532
Abu Dawud 2532