The verse "People, fear your Lord. The earthquake of the Hour is a mighty thing" [Hajj 22:1] down to His words "but the punishment of Allah is severe" [Hajj 22:2] was revealed to the Prophet ﷺ while he was on a journey. He raised his voice with it until his companions gathered around him, and then he said, "Do you know what day this is? It is the day when Allah will say to Adam, 'Adam, arise and send forth the delegation of the Fire, out of every thousand, nine hundred and ninety nine to the Fire and one to Paradise.'"This weighed heavily on the Muslims, so the Prophet ﷺ said, "Be steady, keep close to what is right, and take heart. By Him in whose hand my soul is, among mankind you are only like a mole on the side of a camel, or like a small mark on a beast's foreleg. With you there are two creations that have never been with anything without outnumbering it, Yajuj and Majuj, along with those who have perished of the disbelievers among humans and jinn."
أنزلت{يأيها الناس اتقوا ربكم إن زلزلة الساعة شي عظيم} إلى قوله تعالى: {ولكن عذاب الله شديد} [الحج: ١-٢]، قال: نزلت على النبي ﷺ وهو في مسير له، فرفع بها صوته حتى ثاب إليه أصحابه، فقال: أتدرون أي يوم هذا؟ يوم يقول الله لآدم: يا آدم، قم فابعث بعث النار من كل ألف تسعمائة وتسعة وتسعين إلى النار وواحدا إلى الجنة، قال: فكبر ذلك على المسلمين، فقال النبي ﷺ: سددوا وقاربوا وأبشروا، فوالذي نفسي بيده ما أنتم في الناس إلا كالشامة في جنب البعير، أو كالرقمة في ذراع الدابة، فإن معكم لخليقتين ما كانتا مع شيء قط إلا كثرتاه: يأجوج ومأجوج، ومن هلك من كفرة الإنس والجن.
Abdul-Razzaq narrated it in his Tafsir (2/31) — and this is his wording — and Abd bin Humayd (1185), and Ibn Hibban graded it sahih (7354), as did Hakim (1/29, and 4/566), all of them by way of Mamar, from Qatada, from Anas, who related it. Its chain of transmission is sahih. Hakim said, "Sahih according to the standard of the two sheikhs."