A man from among the Companions of the Prophet (peace and blessings be upon him) narrates (I think he was Sayyiduna Abu Malik al-Ash'ari (may Allah be pleased with him)); he narrates that the Prophet (peace and blessings be upon him) said: "I command you with five things: I command you to listen and obey, to stay with the community (jama'ah), to emigrate, and to strive in the path of Allah. Whoever leaves the community by a hand-span has removed the collar of Islam from his head; and whoever calls with the call of the Age of Ignorance (jahiliyyah) will go to Hell." The people said: "O Messenger of Allah, even if he fasts and prays?" The Prophet (peace and blessings be upon him) said: "Even if he fasts and prays. Rather, call yourselves by the name that Allah Almighty has given you: He has named you the servants of Allah, the Muslims, the believers."
Ahmad recorded it, and its narrators are thiqat (trustworthy), the narrators of the Sahih, except Ali bin Ishaq al-Sulami, who is thiqah (trustworthy).
Al-Tabarani recorded it in abridged form, but he recorded these words: "Whoever separates from the community by the length of a bow, no prayer or fast of his will be accepted, and these are the ones who will be the fuel of the Fire."
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الخلافة / 9094
Hadith Gradingمحدثین:إسنادہ صحیح
Hadith Takhrij«اخرجه احمد فى المسند (130/4) ، أخرجه مسند أحمد برقم: 22403، وأخرجه السنن الكبرى للنسائي برقم: 11603، وأخرجه المعجم الكبير للطبراني برقم: 3468»