Hadithcore
Sunan Abi Dawud, 2533
da’if· Al-Albani

Narrated AbuHurayrah:

The Prophet (ﷺ) said: Striving in the path of Allah (jihad) is incumbent on you along with every ruler, whether he is pious or impious; the prayer is obligatory on you behind every believer, pious or impious, even if he commits grave sins; the (funeral) prayer is incumbent upon every Muslim, pious and impious, even if he commits major sins.

حَدَّثَنَا أَحْمَدُ بْنُ صَالِحٍ، حَدَّثَنَا ابْنُ وَهْبٍ، حَدَّثَنِي مُعَاوِيَةُ بْنُ صَالِحٍ، عَنِ الْعَلاَءِ بْنِ الْحَارِثِ، عَنْ مَكْحُولٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏:‏ ‏

‏ الْجِهَادُ وَاجِبٌ عَلَيْكُمْ مَعَ كُلِّ أَمِيرٍ بَرًّا كَانَ أَوْ فَاجِرًا، وَالصَّلاَةُ وَاجِبَةٌ عَلَيْكُمْ خَلْفَ كُلِّ مُسْلِمٍ بَرًّا كَانَ أَوْ فَاجِرًا وَإِنْ عَمِلَ الْكَبَائِرَ، وَالصَّلاَةُ وَاجِبَةٌ عَلَى كُلِّ مُسْلِمٍ بَرًّا كَانَ أَوْ فَاجِرًا وَإِنْ عَمِلَ الْكَبَائِرَ ‏

‏ ‏.‏

References2 variants
In-Book Reference
Book 15, Hadith 57
English Reference
Book 14, Hadith 2527