Sayyiduna Thawban (may Allah be pleased with him) says that the Prophet (peace and blessings be upon him) said: "Allah, the Lord of Might, folded up the earth for me, so I saw its east and its west. Allah, the Lord of Might, granted me the two treasures, the red and the white, and the dominion of my Ummah will reach as far as the earth was folded up for me. I implored Allah, the Lord of Might, not to destroy my Ummah through famine or by giving an enemy power over them, and that they not split into factions and harm one another. Allah, the Lord of Might, said: O Muhammad! When I grant something, there is no one who can turn it back. Your Ummah will not be destroyed by famine or by another enemy being given power over them, even if enemies gather against them from every side, until they themselves destroy one another, take one another captive and fight one another. Tribes of my Ummah will go back to shirk and the worship of idols. What I fear most is misguiding leaders, and once fighting begins among them it will not end until the Day of Resurrection. Soon nearly thirty lying dajjals will appear in my Ummah. I am the last Prophet; there will be no prophet after me. A group of my Ummah will always remain upon the truth until the command of Allah comes."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18617