Mishkat
al-Masabih
مشكاة المصابيح
Prayer
كتاب الصلاة
Chapter 27b: The Office of Imam - Section 2
باب الإمامة - الفصل الثاني
Mishkat al-Masabih 1125
Abu Huraira reported Allah's Messenger ﷺ as saying, “Jihad is a necessary duty for you along with any commander, pious or impious, even if he commits heinous sins; prayer is a necessary duty for you behind any Muslim, pious or impious, even if he commits heinous sins; and prayer is a necessary duty for every Muslim, pious or impious, even if he commits heinous sins.” Abu Dawud transmitted it.
وَعَنْ أَبِي هُرَيْرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صلى الله عَلَيْهِ وَسلم: «الْجِهَادُ وَاجِبٌ عَلَيْكُمْ مَعَ كُلِّ أَمِيرٍ بَرًّا كَانَ أَوْ فَاجِرًا وَإِنْ عَمِلَ الْكَبَائِرَ. وَالصَّلَاةٌ وَاجِبَةٌ عَلَيْكُمْ خَلْفَ كُلِّ مُسْلِمٍ بَرًّا كَانَ أَوْ فَاجِرًا وَإِنْ عَمِلَ الْكَبَائِرَ. وَالصَّلَاةٌ وَاجِبَةٌ عَلَى كُلِّ مُسْلِمٍ بَرًّا كَانَ أَوْ فَاجِرًا وَإِنْ عَمِلَ الْكَبَائِرَ» . رَوَاهُ أَبُو دَاوُد
In-book reference: Mishkat al-Masabih Book 4 Chapter 27b Hadith 1