Asim bin Ubaydullah narrates: The Prophet (peace and blessings be upon him) said: "Soon after me there will be rulers who will sometimes offer the prayer on time and sometimes delay it beyond its proper time. Pray behind them. If they offer the prayer at its time and you offer it with them, you will have the reward and they will have the reward. And if they delay it and you offer it with them, you will have the reward and they will bear the sin. Whoever separates from the Jama'ah dies the death of the Jahiliyyah, and whoever breaks the covenant will come on the Day of Resurrection with no argument in his favour." The narrator says: I asked my teacher: "Who narrated this report to you?" He said: "Abdullah bin Amir bin Rabi'ah narrated it to me from his father, Sayyiduna Amir bin Rabi'ah (may Allah be pleased with him); Sayyiduna Amir (may Allah be pleased with him) told him this from the Prophet (peace and blessings be upon him)."
Ahmad and al-Tabarani in al-Kabir recorded something similar; its chain contains a narrator, Asim bin Ubaydullah, and he is da'if (weak), although Malik narrated from him.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1819