Sahih Muslim Book 020, Hadith Number 4557.
Chapter : Instruction to stick to the main body of the Muslims in the time of trials and warning against those inviting people to disbelief.
It has been narrated (through a different chain of transmitters) on the authority of Abu Huraira that the Messenger of Allah (may peace be upon him) said: Who defected from obedience (to the Amir) and separated from the main body of the Muslim-then he died in that state-would die the death of one belonging to the days of Jahillyya. And he who is killed under the banner of a man who is blind (to the cause for which he is fighting), who gets flared up with family pride and fights for his tribe-is not from my Umma, and whoso from my followers attacks my followers (indiscriminately) killing the righteous and the wicked of them, sparing not (even) those staunch in faith and fulfilling not his obligation towards them who have been given a pledge (of security), is not from me (i.e. is not my follower).