Also on the authority of ‘Umar (may Allah be pleased with him), who said:
One day while we were sitting with the messenger of Allah (may the blessings and peace of Allah be upon him) there appeared before us a man whose clothes were exceedingly white and whose hair was exceedingly black; no signs of journeying were to be seen on him and none of us knew him. He walked up and sat down by the prophet. Resting his knees against his and placing the palms of his hands on his thighs, he said: “O Muhammad, tell me about Islam.” The messenger of Allah said: “Islam is to testify that there is no god but Allah and Muhammad is the messenger of Allah, to perform the prayers, to pay the zakat, to fast in Ramadan, and to make the pilgrimmage to the House if you are able to do so.” He said: “You have spoken rightly,” and we were amazed at him asking him and saying that he had spoken rightly.” He said: “Then tell me about Iman.” He said: “It is to believe in Allah, His angels, His books, His messengers, and the Last Dat, and to believe in divine destiny, both the good and the evil thereof.” He said: “You have spoken rightly.” He said: “Then tell me about Ihsan.” He said: “It is to worship Allah as though you are seeing Him, and while you see Him not yet truly He sees you.” He said: “Then tell me abou the Hour.” He said: “The one questioned about it knows no better than the questioner.” He said: “Then tell me about its signs.” He said: “That the slave-girl will give birth to her mistress and that you will see the barefooted, naked, destitute herdsman competing in constructing lofty buildings.” Then he took himself off and I stayed for a time. Then he said: “O ‘Umar, do you know who the questioner was?” I said: “Allah and His messenger know best.” He said: “He was Gabriel, who came to you to teach you your religion.”
It was related by Muslim.
Translation based on “GEMS OF PROPHETIC WISDOM” p.47 by Shaykh Faisal Abdur-Razzaq