Abu Dawud Book 30, Hadith Number 4239.
Narated By Thawban : The Apostle of Allah (PBUH) said: Allah, the Exalted, folded for me the earth, or he said (the narrator is doubtful): My Lord folded for me the earth, so much so that I saw its eastâ€™s and westâ€™s (i.e. the extremities). The Kingdom of my community will reach as far as the earth was folded for me. The two treasures, the red and the white, were bestowed on me. I prayed to my Lord that He may not destroy my community by a prevailing famine, and not give their control to an enemy who annihilates them en masse except from among themselves. My Lord said to me: Muhammad, if I make a decision, it is not withdrawn; and I shall not destroy them by a prevailing famine, and I shall not give their control to an enemy, except from among themselves, who exterminates them en masse, even if they are stormed from all sides of the earth; only a section of them will destroy another section, and a section will captivate another section. I am afraid about my community of those leaders who will lead astray. When the sword is used among my people, it will not be withdrawn from them till the Day of Resurrection, and the Last Hour will not come before the tribes of my people attach themselves to the polytheists and tribes of my people worship idols. There will be among my people thirty great liars each of them asserting that he is (Allah’s) prophet, whereas I am the Seal of the Prophets after whom (me) there will be no prophet; and a section of my people will continue to hold to the truth – (according to Ibn ‘Isa’s version: (will continue to dominate) – the agreed version goes: “and will not be injured by those who oppose them, till Allah’s command comes.”