Sayyiduna Hudhayfah bin al-Yaman (may Allah be pleased with him) said: People used to ask the Prophet (peace and blessings be upon him) about good, and I used to ask him about evil, out of fear that some evil might come upon me. I asked: O Messenger of Allah! We were in ignorance (jahiliyyah) and evil, and Allah brought this good; will there be any evil after this good? He (peace and blessings be upon him) said: "Yes." I asked again: Will there then be good after that evil? He (peace and blessings be upon him) said: "Yes, but there will be 'dakhan' (smoke, i.e. impurity) in it." I asked: What is its 'dakhan'? He (peace and blessings be upon him) said: "People who will seek guidance in other than my guidance; you will approve of some of their ways and reject others." I said: Will there be evil after that good? He (peace and blessings be upon him) said: "Yes, people who will call (others) to Hell; whoever accepts their call will go into Hell." I said: O Messenger of Allah! Describe them to us. He (peace and blessings be upon him) said: "They will be from among us and will speak our language." I said: If I meet them, what should I do? He (peace and blessings be upon him) said: "Hold fast to the community (jama'ah) of the Muslims and their leader (imam)." I asked: And if at that time the Muslims have no community and no leader? He (peace and blessings be upon him) said: "Keep away from all those sects, even if you have to cling to the root of a tree, until death comes to you."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قتال أهل البغي / 16610