It is narrated from Ali bin al-Husayn (may Allah have mercy on him) that some people of Quraysh came to him and he said: "Shall I not tell you about Abu al-Qasim (peace and blessings be upon him)?" They said: "Certainly!" He said: "When three days remained before the death of the Messenger of Allah (peace and blessings be upon him), Allah Almighty sent Sayyiduna Jibril (peace be upon him) down to him. He came and said: 'O Ahmad, Allah, the Mighty and Majestic, has sent me to you as an honour, a distinction and a special favour for you. He asks you about what He knows better than you; He asks: Kayfa tajiduka? (How do you find yourself?)' He (peace and blessings be upon him) said: 'O Jibril, I find myself in distress.' Then he came on the second day and repeated the same words, and he (peace and blessings be upon him) gave the same answer again. Then he came on the third day and said the same again, and he (peace and blessings be upon him) said: 'O Jibril, I find myself in distress, and in grief and sorrow.' At that time an angel called Isma'il came down through the air with Jibril (peace be upon him), with seventy thousand (angels) under his command. Jibril (peace be upon him) said to him: 'O Ahmad, this is the Angel of Death asking your permission to come in. He has never asked permission of any human being before you, nor will he ask it of anyone after you.' The Messenger of Allah (peace and blessings be upon him) said: 'Give him permission.' So Jibril (peace be upon him) gave him permission and he came in. The Angel of Death said: 'O Ahmad, Allah, the Mighty and Majestic, has sent me to you and has commanded me to obey you. If you command me to take your soul, I will take it, and if you dislike it, I will leave it.' Jibril (peace be upon him) said: 'O Ahmad, Allah, the Mighty and Majestic, longs to meet you.' The Messenger of Allah (peace and blessings be upon him) said: 'O Angel of Death, carry out what you have been commanded.' Jibril (peace be upon him) said: 'O Ahmad, peace be upon you. This is my last step upon the earth; you alone were my need in this world.' When the soul of the Messenger of Allah (peace and blessings be upon him) had been taken and the time of condolence came, the voice of someone arriving was heard: his movement could be sensed, but no person could be seen. He said: 'Peace be upon you, O people of the house, and the mercy of Allah. In Allah there is consolation for every calamity, a replacement for everyone who perishes, and a making-good of everything that is lost. So put your trust in Allah alone and place your hope in Him alone, for the truly deprived one is he who is deprived of the reward - or he said: the truly afflicted one is he who is deprived of the reward - and peace be upon you.' Ali bin al-Husayn asked: 'Do you know who this was? This was Sayyiduna al-Khadir (peace be upon him).'"
Muhammad bin Yahya bin Abi Umar recorded this narration from Muhammad bin Ja'far bin Muhammad, from his father (Ja'far), from his father (Muhammad al-Baqir), from his grandfather Ali (bin al-Husayn), and all the narrators of its chain are thiqah (trustworthy).