Narrated 'Imran bin Husain:
when (the following) was revealed: "O mankind! Have Taqwa of your Lord! Verily the earthquake of the hour is a terrible thing..." up to His saying: "But Allah's torment is severe...(22:1 & 2)" - he said: "These Ayat were revealed while he (ﷺ) was on a journey and he said: 'Do you know what Day this is?' So they said: 'Allah and His Messenger know better.' He said: 'That is the day when Allah says to Adam: Send forth those who are to be sent to the Fire. So he says: O Lord! How many are to be sent? He says: Nine-hundred and ninety-nine in the Fire, and one to Paradise. He said: "So the Muslims started crying. Then the Messenger of Allah (ﷺ) said: 'Close your ranks and be straight forward, for there was never any Prophethood but there was a time of ignorance just before his advent, so the number will be taken from that time of ignorance, and if that is not enough, it will be made up of the hypocrites. The parable of you and the other nations is that you are like a mark on the foreleg of an animal, or a mole on the flank of a camel.' Then he said: 'I hope that you will be a quarter of the people of Paradise.' They said: Allahu Akbar. Then he said: 'I hope that you will be a third of the people of Paradise.' They said: Allahu Akbar. Then he said: 'I hope that you will be half of the people of Paradise.' They said: Allahu Akbar." He said: "I do not know if he said two thirds or not."
English reference: Vol. 5, Book 44, Hadith 3168
Arabic reference: Book 47, Hadith 3466