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.
Reference: Sunan Abi Dawud 2533 In-book : Book 15, Hadith 57 English translation : Book 14, Hadith 2527
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.