The Messenger of Allah ﷺ said, "There will be rulers over you after me who will delay the prayer. The prayer will count in your favor but against them. So pray with them as long as they pray toward the qiblah."
حدثنا أبو الوليد الطيالسي حدثنا أبو هاشم يعني الزعفراني حدثني صالح بن عبيد
قال رسول الله ﷺ يكون عليكم أمراء من بعدي يؤخرون الصلاة فهي لكم وهي عليهم فصلوا معهم ما صلوا القبلة
No references are available.
[Hasan] Reported by Tabarani in Al-Kabir, 18/375, no. 959, from the hadith of Abu Walid Tayalisi, through him. It has corroborating narrations in Bukhari (Fath, 2/187) and elsewhere.