The Messenger of Allah ﷺ said, "Whoever withdraws his hand from obedience will have no defense on the Day of Resurrection, and whoever dies having separated from the community dies the death of pre-Islamic ignorance."
حدثنا هاشم حدثنا عبد الرحمن يعني ابن عبد الله بن دينار عن زيد بن أسلم
عن رسول الله ﷺ قال من نزع يدا من طاعة فلا حجة له يوم القيامة ومن مات مفارقا للجماعة فقد مات ميتة جاهلية
Its isnad is sahih. It has already appeared through the narration of Hasan bin Musa from Abdul-Rahman bin Abdullah bin Dinar, with this same isnad, 5386, and it has already appeared, at length and in brief, through other routes, the last of them being 5897.