Praise be to Allah.
No one knows exactly when he will die, or in what land he will die. Allah, may He be exalted, says (interpretation of the meaning):
“Verily, Allah! With Him (Alone) is the knowledge of the Hour, He sends down the rain, and knows that which is in the wombs. No person knows what he will earn tomorrow, and no person knows in what land he will die. Verily, Allah is All-Knower, All-Aware (of things)”
There are no specific signs by which a person may know that his death and the end of his life are approaching. This is by the mercy of Allah towards His slaves, for if a person knew when he was going to die, and he knew that repentance expiates the sins that come before it, perhaps he might indulge in sins and commit evil deeds, and promise himself that one hour before his death he will repent and give up his sin. But such a person does not deserve to be a slave of Allah; rather he is a slave to his whims and desires.
This is in contrast to reality, for no person knows when he will die, so the wise person strives to make up what he has missed out on and hastens to do so by repenting and doing righteous deeds, for he does not know when his life will end, and he remains in this state until Allah takes his soul. Such a person deserves to be a righteous slave who loves to obey Allah and hates to disobey Him.
But there are some signs which may indicate that the end of a person’s life is approaching, such as if he suffers a severe sickness from which people hardly ever recover. The same applies if he reaches extreme old age, or is in a serious accident, and other matters that may happen by the divine decree.
In the answer to question no. 184737 we mentioned the signs which are indicative of a person being righteous at the time of his death, and the signs which are indicative of a bad end.
If a person feels that his death is approaching because of severe illness and the like, then what he must do is hasten to set things straight by repenting to Allah, making up for any wrongs done to people and asking them for forgiveness, hastening to do righteous deeds, being serious and focused in turning to Allah and obeying Him, and seeking pardon and forgiveness from Him by His grace, in addition to thinking positively of Allah, may He be glorified, and trusting in His abundant grace and mercy, and believing that He will never let down a slave who thinks positively of Him.
Muslim (2877) narrated that Jaabir said: I heard the Prophet (blessings and peace of Allah be upon him) say, three days before he died: “No one of you should die except thinking positively of Allah.”
He should also do a great deal of those deeds that expiate and erase sins, such as praying for forgiveness, maintaining wudoo’, praying, Hajj and ‘Umrah, and so on.
The agonies of death are the last hardship that a person encounters before meeting Allah, and they are the last thing by means of which Allah expiates the sins of His slave. We ask Allah to make these agonies easy for us and help us to bear them.
Al-Bukhaari (4449) narrated from ‘Aa’ishah that during the sickness of which he died, the Messenger of Allah (blessings and peace of Allah be upon him) began to put his hand in water and wipe his face with it, saying: “Laa ilaaha ill-Allah (there is no god but Allah), verily death has agonies.” Then he held up his hand and started saying: “With the higher companions…” until he passed away and his hand fell.
At-Tirmidhi (978) narrated from ‘Aa’ishah that she said: I saw the Messenger of Allah (blessings and peace of Allah be upon him) as he was dying. There was a vessel of water next to him, and he would put his hand in the vessel then wipe his face with the water, then he said: “O Allah, help me to bear the agonies of death.”
Classed as hasan by al-Haafiz in al-Fath (11/362); classed as da‘eef by al-Albaani in Da‘eef at-Tirmidhi
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked:
Do the agonies of death reduced the burden of sin? Does sickness that precedes death do likewise?
Everything that befalls a person of sickness, hardship, worry, or distress, even a thorn that pricks him, is expiation for his sins. Then if he is patient and seeks reward, in addition to expiation of sin he will have the reward for that patience with which he faced the calamity that befell him. There is no differentiation in that regard between what happens at the time of death and what happens before that.
End quote from Fataawa Noor ‘ala ad-Darb (24/2)
Alongside the hardship and agonies of death, what the believer receives of glad tidings and being made steadfast at the time of his death are among the things that will make what he is faced with easier to bear and will make him long for what comes after it of meeting Allah.
Al-Haafiz Ibn Hajar (may Allah have mercy on him) said:
The dying person can only be one of two things: either it is a relief for him or others are relieved of him. In either case things may be very hard for him at the time of death or they may be alleviated for him. In the former case, he is the one who is faced with the agonies of death, and that has nothing to do with whether he was pious or an evildoer; rather if he was one of the pious it will increase him in reward, otherwise it will expiate for him accordingly, then he will be relieved of the annoyances of this world, of which this is the last. ‘Umar ibn ‘Abd al-‘Azeez said: I would not like the agonies of death to be reduced for me, for that is the last thing by means of which sin may be expiated for the believer. Yet at the same time, what the believer receives of glad tidings and the angels being happy to meet him, and their accompanying him, and his joy at meeting his Lord, make it easier for him to bear whatever he may face of the pain of death, until it becomes as if he does not feel anything of that.
End quote from Fath al-Baari (11/365)
See also the answer to question no. 135314
We do not know of any way of reducing the agonies of death, except that the individual should turn to his Lord concerning that, and call upon Him at times of hardship and of ease. Perhaps we will do what the Prophet (blessings and peace of Allah be upon him) did, when he put his hands in the water then wiped his face with them and asked Allah to help him to face the agonies of death, as mentioned above.
However some of the early generations used to regard this hardship as a mercy, as quoted above from ‘Umar ibn ‘Abd al-‘Azeez. ‘Abdullah ibn Ahmad narrated in Zawaa’id az-Zuhd (p. 388) that Ibraaheem an-Nakha‘i said: They used to regard it as mustahabb for the sick person to go through some hardship at the time of death. And it was narrated from Mansoor that Ibraaheem used to like the severe agony of death.
We do not know of anyone who is saved from this hardship apart from the martyr. Imam Ahmad (7953), at-Tirmidhi (1668 – and he classed it as saheeh), an-Nasaa’i (3161) and Ibn Maajah (2802) narrated from Abu Hurayrah that the Messenger of Allah (blessings and peace of Allah be upon him) said: “The martyr does not feel anything more when he is killed than one of you feels if he is pinched.”
Classed as saheeh by al-Albaani in Saheeh at-Tirmidhi and elsewhere.
Al-Mannaawi (may Allah have mercy on him) said:
What this means is that Allah, may He be exalted, makes death easy for him and suffices him against its agonies and distress; in fact the martyr may enjoy giving himself for the sake of Allah willingly, as Khubayb al-Ansaari said (in verse):
I do not care if I am killed as a Muslim; it does not matter how I may be killed.
End quote from Fayd al-Qadeer (4/182)
Righteous deeds are all deeds enjoined, encouraged and recommended by the Lawgiver, and some of them are superior to others. Among the best of righteous deeds by means of which a person may draw close to his Lord and which the Muslim is advised to do constantly are: to remember Allah a great deal, read Qur’an, honour one’s parents, uphold ties of kinship, perform Hajj and ‘Umrah, offer voluntary prayers at night, give charity in secret, have a good attitude, spread the greeting of salaam, feed people, speak truthfully, enjoin what is good and forbid what is evil, love good for people, refrain from harming them, co-operate in righteousness and piety, reconcile between people and other righteous deeds.
For more information, please see the answer to question no. 26242
We advise the questioner to take thinking of death and its hardships as a means of encouraging her to fear Allah and do righteous deeds, for if a person fears Allah and does good, Allah will make all difficulties easy for him, and relieve him of every distress and hardship.
For more information, please see the answer to question no. 8829
And Allah knows best.