Sa'id ibn 'Abd Allah related from his father that as the Prophet became more ill, the people of Medina gathered around the Mosque. Al-Abbas (ra), al-Fadl (ra) and Ali (ra) entered to tell him that they were outside. He stretched out his hand and said
"Here,"So they grasped it.
"What say you?"he asked, and they replied
"We fear that you shall die."Their wives began to wail when they heard them say this.So the Prophet mustered up his strength, got up and went outside leaning upon Ali (ra) and al-Fadl (ra) , with al-Abbas (ra) in front. His head was bandaged and his feet dragged along the ground, but he gained the minbar and sat down upon its lowest step. The people collected around him.
He praised and glorified Allah (swt), and then said,
"O people! I have heard that you fear I shall die, as though you considered death to be something odious (disgusting). What is it that you resent in the death of your prophet? Has not my death-notice being given you; have not you yourselves been given your death-notices? Was any prophet of those that were sent before me rendered immortal, that I might be granted eternal life? Nay, I shall go to join my Lord, as shall you all...Truly Allah (swt) has said, "By the Passage of Time, All mankind is in complete loss. Except those who believe and do righteous deeds. And remind each other to the truth, and remind each other to patience." (Qur’an 103:1-3)
"Affairs run by the leave of Allah (swt). Never permit the slowness of something to induce you to hastening it, for truly Allah (swt) hastens not by reason of the haste of anyone. Whoever seeks to overthrow Allah (swt), Allah (swt) shall overthrow him, and whoever seeks to deceive Him will be deceived by Him. If you turn away, will you work corruption in the earth and sever your family ties?"...
"I am preceding you, but you shall join me. Out tryst (arrangement to meet) is at a Pool, my Pool whose breadth exceeds the distance which is between the Bostra of Syria and the San'a of the Yemen. Into it from the spout of al-Kawthar pours a water which is whiter than milk, softer than foam and sweeter than honey; whosoever drinks of it shall never thirst again. Pearls are its pebbles; musk is its bed. Whosoever is deprived of it tomorrow at the Standing Place (at the Judgement) is deprived of all good. Therefore, let him who is desirous of meeting me there tomorrow refrain his tongue and hand from all save what is meet (good/praiseworthy)".A’isha (ra) narrated that, in the morning of the day that the Prophet’s death came, his condition had improved and the men had gone back to their homes or to work while rejoicing, leaving him with the women.
“We were in a state of hope and joyfulness, the likes of which we had never known,”she said. The Prophet then asked everyone except A’isha (ra) to leave, saying that an Angel had requested to come in. He had been lying down with his head in A’isha’s (ra) lap, but now he sat up and she retired to the other side of the room. He spoke with the Angel at length, before summoning her and returning his head to her lap, and he bid the other women to enter again.
"I did not sense that was Jibreel (as),"said A’isha (ra)
"Indeed, A'isha,"he replied.
"That was the Angel of Death, who came to me and said, 'I am sent by Allah (swt), Who has commanded me not to enter your house without your consent. So if you should withhold it from me I shall go back, but should you give it me, then shall I enter. And He enjoined me not to take your spirit until you so instruct me; what, then, might your instructions be?' 'Hold back from me', I said, 'until Jibreel (as) has come to me, for this is his hour'."A’isha’s (ra) story continues, ‘So we came into the presence of a matter for which we had neither answer nor opinion. We were downcast; it was as if we had been struck by a calamity about which we could do nothing. Not one of the people of the Household spoke because of their awe in the face of this affair and because of a fear which filled our depths. At this hour, Jibreel (as) came (I felt his presence) and gave his greeting. The people of the Household left, and the angel entered, saying,
"Allah (swt) gives you His greetings, and asks how you are, although He knows better than you your condition; yet He desires to increase you in dignity and honour and render your dignity and honour greater than that of all other creatures, that this may be a sunnah for your nation (i.e. that all people should greet the sick by asking them how they are)."
"I am in pain,"he said. And the Angel replied,
"Be glad, for Allah (swt) has willed to bring you to that which He has made ready for you."
"O Jibreel,"he said,
"The Angel of Death asked permission to enter!"and he told him of what had transpired. Jibreel (as) said,
"O Muhammad! Your Lord longs for you! Has He not given you to know His purpose for you? Nay, by Allah, never has the Angel of Death sought permission of anyone, no more is his permission to be sought at any time. It is only that your Lord is making perfect your honour while He longs for you."
"Then do not leave until he comes,"he said.
'Then he allowed the women to enter, and said
"Fatima, draw near."She leaned over him and he whispered in her ear. Then she raised her head, and was smiling, unable to speak. What we saw in her was most astonishing. Afterwards we questioned her about what had happened, and she said
"He told me 'Today I shall die,' so I wept; then he said, 'I have prayed to Allah (swt) to let you be the first of my family to join me, and to set you with me,' so I smiled.”'Then she bought her two sons (Hassan (ra) and Husain (ra)) close by him. He drew in their fragrance.‘Then the Angel of Death came, greeted him, and asked leave to enter. He granted it to him, and the Angel said,
“What are your instructions, O Muhammad?”
“Take me now to my Lord,”he said.
“Yes indeed,”he responded,
“On this day of yours, truly your Lord longs for you. He has not paused over any man as He has paused over you, nor has He forbidden me to enter without permission upon anyone else. But now your hour has come.”And he went out. Then came Jibreel (as), who said,
“Peace be upon you, O Messenger of Allah! This is the final time I shall ever descend on the earth. Revelation is folded up, the world is folded up, and I have no business except with you. Upon it now I have no purpose except being present with you, after which I shall remain in my place. No! By He who has sent Muhammad with the Truth, there is no-one in the house able to change a word of what I have said. He will never be sent again despite the greatness of the discourse concerning him which shall be heard, and despite our affection and sympathy.”’A’isha (ra) clutched the Prophet close to her body as he began to drift in and out of consciousness. She noticed that he was now sweating greatly, and he said,
“O A’isha, the soul of a believer departs with his sweat, while that of a disbeliever departs through his jaws like a donkey.”At this, the women became worried that his time was drawing very near, and sent for their families. But before anyone arrived, the Prophet Muhammad passed away. In his last moments, whenever he was able to speak, he would say,
“The Prayer! The Prayer! You shall always hold together as long as you pray together. The Prayer! The Prayer!”[Tabari]A’isha (ra) said,
‘When the Messenger of Allah died the people were thunderstruck, and a great wailing rose up as the angels covered him with a garment of mine. The people differed amongst themselves: some denied the death, others were struck dumb and did not speak for a long while, whereas others became delirious and babbled without meaning. Others maintained their reason, but there were still others who were unable even to walk. Umar (ra) was among those who denied his death; Ali (ra) was one of those unable to walk, while Uthman (ra) was of those who had been struck dumb.
There was no-one among the Muslims in a state comparable to that of Abu Bakr (ra) of al-Abbas (ra), for Allah (swt) had succoured (blessed) them both with guidance and good sense...[Abu Bakr (ra)] went out to the people and said,
“O people! Whoever has worshipped Muhammad, (then know that) Muhammad has died. But whoever worshipped the Lord of Muhammad, (then know that) He is Alive, and does not die. For Allah (swt) has said, 'Muhammad is but a messenger; messengers have passed away before him. Will it be that when he dies or is slain, you will turn back on your heels?' [Qur’an 3:144]"And it was as though the people had never heard this verse before that day.'
When the time of prayer arrived, Bilal (ra), was asked to make the adhan (call to prayer). When he reached “Ashhadu anna Muhammadan rasulu-llah” (I testify that Muhammad is the Messenger of Allah), he was in tears, and could not continue. He asked Abu Bakr (ra) to pardon him from the task of making adhan, as he could not bear to do that after the Prophet’s death. He only called the adhan twice more in his whole life.
In the life of the Prophet , we have been given a model on which we should base our conduct and behaviour. And in the story of his death, we have been given a lesson that should make us think about our own mortality, and encourage us to strive to do our best throughout our short time in this life, so that we may be able to meet him in the next life.
The above is abridged from Remembrance of Death and the Afterlife By Imam al-Ghazali. Book 40 of the Revival of the Religious Sciences. Translation by T.J. Winter. Islamic Texts Society. ISDN 0946621136. Pages 57 - 73
Source : http://www.therevival.co.uk/last-days-prophet-pbuh