Allah's Messenger (peace be upon him) was detained one morning from observing the dawn prayer (in congregation) along with us till the sun had almost appeared on the horizon. He then came out hurriedly and Iqamah for prayer was observed and he conducted it (prayer) in brief form. When he had concluded the prayer by saying As-salamu alaykum wa Rahmatullah, he called out to us saying: Remain in your places as you were. Then turning to us he said: I am going to tell you what detained me from you (on account of which I could not join you in the prayer) in the morning. I got up in the night and performed ablution and observed the prayer as had been ordained for me. I dozed in my prayer till I was overcome by (sleep) and lo, I found myself in the presence of my Lord, the Blessed and the Glorious, in the best form. He said: Muhammad! I said: At Thy service, my Lord. He said: What these highest angels contend about? I said: I do not know. He repeated it thrice. He said: Then I saw Him put His Palms between my shoulder blades till I felt the coldness of His fingers between the two sides of my chest. Then everything was illuminated for me and I could recognize everything. He said: Muhammad! I said: At Thy service, my Lord. He said: What do these high angels contend about? I said: In regard to expiations. He said: What are these? I said: Going on foot to join congregational prayers, sitting in the mosques after the prayers, performing ablution well despite difficulties. He again said: Then what do they contend? I said: In regard to the ranks. He said: What are these? I said: Providing of food, speaking gently, observing the prayer when the people are asleep. He again said to me: Beg (Your Lord) and say: O Allah, I beg of Thee (power) to do good deeds, and abandon abominable deeds, to love the poor, that Thou forgive me and show mercy to me and when Thou intendst to put people to trial Thou causes me to die unblemished and I beg of Thee Thy love and the love of one who loves Thee and the love for the deed which brings me near to Thy love. Allah's Messenger (peace be upon him) said: It is a truth, so learn it and teach it.
Transmitted by Ahmad, Tirmidhi who said: This is a hasan sahih hadith and I asked Muhammad ibn Isma'il about this hadith and he said: It is a sahih hadith.