It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) recited this verse: "A Day that will make the children grey-haired" [Surah al-Muzzammil: 17], and said: "That is the Day of Resurrection, and that is the Day when Allah, exalted be His mention, will say to Adam (peace be upon him): Stand up and send forth from your offspring a contingent to the Fire. He will say: How many, O my Lord? Allah will say: Out of every thousand, nine hundred and ninety-nine, and one will be saved." This weighed heavily on the Muslims, and the Messenger of Allah (peace and blessings be upon him) realised it. Then, when the Messenger of Allah (peace and blessings be upon him) saw this in their faces, he said: "The children of Adam are many, and Gog and Magog (Ya'juj and Ma'juj) are also of the offspring of Adam, and not one man of them dies until a thousand men from his own loins inherit from him. In them and in those like them there is a shield for you."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11982