Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Whoever withdraws his obedience and parts from the community, then dies, dies the death of ignorance. Whoever fights under a blind banner, becoming angry for the sake of tribal partisanship and fighting for the sake of tribal partisanship, is not of my nation. And whoever rises up from within my nation against my nation, striking down its righteous and its wicked alike, sparing none of its believers and honoring no covenant with those bound by a pledge, has no part with me."

Muslim 4788

Sahih

و حدثني زهير بن حرب حدثنا عبد الرحمن بن مهدي حدثنا مهدي بن ميمون عن غيلان بن جرير عن زياد بن رياح

عن أبي هريرة قال

قال رسول الله ﷺ من خرج من الطاعة وفارق الجماعة ثم مات مات ميتة جاهلية ومن قتل تحت راية عمية يغضب للعصبة ويقاتل للعصبة فليس من أمتي ومن خرج من أمتي على أمتي يضرب برها وفاجرها لا يتحاش من مؤمنها ولا يفي بذي عهدها فليس مني

مسلم 4788صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Leadership
Chapter
Command to adhere to the community when tribulations appear and warning against callers to disbelief
Numbering
Darussalam 4788
Muslim 4788