Only the most wicked remain on the earth at the end of time
In The Name of Allah, The Most Merciful, The Bestower of Mercy.
Imam Muhammad Ibn Salih Al-Uthaymeen, may Allah have mercy upon him, was asked:
We are seeking an answer for this question regarding how to reconcile the hadiths: “There will not ceased to be a group amongst my Ummah upon the truth – manifest; neither harmed by those who forsake them nor by those who oppose them until Allah’s Command comes to pass” and the hadith “The hour (i.e. day of Judgement) will not be established except in the midst of the most evil people”.
Response: All praise be to Allah, Lord of the worlds, and may Allah’s peace and blessings be upon our Prophet Muhammad, and all his family and companions. Neither is it possible for the Qur’an to contradict itself nor is it possible for the authentic Sunnah that was reported from Allah’s Messenger, peace and blessings of Allah be upon him, to contradict itself, nor is it possible for the authentic Sunnah to contradict the Qur’an vice versa. Neither is it possible for the Qur’an and the Sunnah to contradict (what the true reality is and should be) nor is it possible for the Qur’an and authentic Sunnah to contradict sound intellect. This is because the Qur’an is the speech of Allah, and Allah [The Exalted] said:
أَفَلَا يَتَدَبَّرُونَ ٱلۡقُرۡءَانَۚ وَلَوۡ كَانَ مِنۡ عِندِ غَيۡرِ ٱللَّهِ لَوَجَدُواْ فِيهِ ٱخۡتِلَـٰفً۬ا ڪَثِيرً۬ا
Do they not then consider the Quran carefully? Had it been from other than Allah, they would surely have found therein much contradictions]. [An-Nisaa. 82]
This is because Allah’s speech is (perfect) truth and truth can never contradict itself. Also, the same applies to the authentic Prophetic Sunnah, it is (perfect) truth and can never contradict itself. Thus, based on this principle, we proceed to answer the question. The Messenger’s statement, “There will not cease to be a group amongst my Ummah upon the truth- manifest; neither harmed by those who forsake them nor those who oppose them until Allah’s Command come to pass”, and in another report, “Until the hour (i.e. Day of Judgement) is established”. The intent behind the phrase Amrullaah (Allah’s Command) in this hadith is when the believers and pious friends of Allah pass away- when the day of Judgement is very close. (As for the hadith), “The hour will not be established except upon the most evil people”, this means that when the believers and the pious die, only the most evil people will remain, and upon them the Hour will be established.
[Nur Ala a Ad-Darb. Number 272]