The Messenger of Allah ﷺ was sitting one day in full view of the people when a man came to him and asked him about several matters. Among them, he said, "Messenger of Allah, when will the Hour come?"The Messenger of Allah ﷺ replied, "The one being asked knows no more about it than the one asking. But I will tell you about its signs. When the slave-girl gives birth to her master, that is one of its signs. When the barefoot and naked become the leaders of the people, that is one of its signs. When the herdsmen of sheep compete with one another in raising tall buildings, that is one of its signs. It is among five things that none knows but Allah."Then he ﷺ recited, "Indeed, Allah has knowledge of the Hour and sends down the rain and knows what is in the wombs. No soul knows what it will earn tomorrow, and no soul knows in what land it will die. Indeed, Allah is Aleem and All-Aware." [Luqman 31:34]Then the man turned away, and the Messenger of Allah ﷺ said, "Bring the man back to me." They went to bring him back but found no one. The Messenger of Allah ﷺ then said, "That was Jibreel. He came to teach the people their religion."
كان رسول الله ﷺ يوما بارزا للناس، فأتاه رجل، فسأله عن أشياء منها قال: يا رسول الله متى الساعة؟ قال: ما المسؤول عنها بأعلم من السائل، ولكن سأحدثك عن أشراطها، إذا ولدت الأمة ربها، فذاك من أشراطها، وإذا كانت العراة الحفاة رؤوس الناس، فذاك من أشراطها، وإذا تطاول رعاء البهم في البنيان، فذاك من أشراطها، في خمس لا يعلمهن إلا الله، ثم تلا ﷺ {إن الله عنده علم الساعة وينزل الغيث ويعلم ما في الأرحام وما تدري نفس ماذا تكسب غدا وما تدري نفس بأي أرض تموت إن الله عليم خبير} [سورة لقمان آية: ٣٤] قال: ثم أدبر الرجل، فقال رسول الله ﷺ: ردوا علي الرجل فأخذوا ليردوه، فلم يروا شيئا، فقال رسول الله ﷺ: هذا جبريل، جاء ليعلم الناس دينهم.
Bukhari narrated it in the Book of Iman (50), and Muslim in the Book of Iman (9:5), both through routes from Ismail bin Ibrahim, who said, Abu Hayan Taymi told us, from Abu Zura, from Abu Hurairah, who mentioned it.