Many incidences have been related in which people ended their lives on a bad note, i.e. a sin, and so have been recounted as having died in a difficult or infamous way. This is because satan works hard at the time of death, a time which is full of tests, difficulties and infirmity, a time when a person is in-between the life of this world and the life of al-Barzakh. Satan’s intent at this stage is to evilly, sinfully and wickedly influence a dying person’s last deeds and actions. He knows that this is his final chance to make this person go astray before the dying person’s soul is taken up to meet its Lord.
For example, the son of Imam Ahmed Ibn Hanbal, Abdullah bin Ahmed, said: "When death approached my father, I sat with him and in my hand was a scrap of cloth with which I wanted to tie his beard and he began to drift in and out of consciousness, then he opened his eyes and said, indicating with his hand:
‘No, not yet. No, not yet.’
And he repeated it three times. After the third repetition, I said to him: ‘Oh, my father! What is this thing which you have said at this time? You fall into unconsciousness so that we say that you have gone, then you return (to consciousness) and say: "No, not yet. No, not yet."’
He said to me:
‘Oh, my son! Do you not know?’
I said: ‘No’. He said:
‘Satan – may Allah's curse be upon him – stood before me, he lowered himself on his knuckles and said to me: "Oh, Ahmad! You have eluded/escaped me." But I replied: "No, not yet, not yet until I die!”’” (The biography of Imam Ahmed bin Hanbal by Salahuddin Ali Abdul Mawjood. Translated by Sameh Strauch)
Imaam al-Qurtubi mentions that a great number of pious and dependable scholars are known to have witnessed the presence of Shaytaan at death. He relates that he heard one of his own respected teachers, Imam Abul-Abbaas Ahmad bin Umar al-Qurtubi, say, “I visited the brother of our teacher, Sheikh Abu Jafar Muhammad al-Qurtubi at Cordova and found him near death. It was said to him, 'Repeat Laa ilaaha illallaah', to which he replied,
'No! No!'
When he came to, we mentioned what had occurred. He said,
'Two devils came to me, one on my left and the other on my right. One of them said, 'Die as a Jew, for verily it is the best of religions,' while the other said, 'Die as a Christian, for truly it is the best of religions.' So I answered them saying, 'No! No! How dare you say such a thing to me!'”
We should keep this enmity and hatred of his in mind whenever he tries to seduce and entice us to evil actions. We should react towards his advice in the way we would react to the advice of someone who we know hates us, wants ill for us and has been waiting for a chance to get us in our most weakest of moments. Surely, we wouldn’t lend an attentive ear to such a person. In fact, we wouldn’t even want to hear his advice through, let alone act upon it! The Prophet (peace be upon him) said, “Verily the Shaytaan attends with you in all your actions. He attends when you eat; if any morsel of food drops, wipe the dirt off it, and eat it instead of leaving it for the Shaytaan. After finishing, lick your fingers, because you do not know where in the food the blessing lies.” (Saheeh Muslim)
Have Positive Thoughts of Allah
Although we should keep in mind the probability of not succeeding in gaining Paradise, we should not be so fearful of the approach of death that we give up hope of Allah’s Mercy and Help. The Prophet (peace be upon him) said: “None of you should die except in the state of having positive thoughts about Allah.” (Saheeh Muslim)
That is why our righteous predecessors would recommend that the dying person be reminded of his good deeds so that he has positive thoughts of Allah, the One Who is the Most Gentle, Merciful and Beneficent.
There are things that we can do right now to bring about these positive thoughts of Allah (the Most Perfect), such as preparing to meet Him by performing good, sincere deeds, having a clean slate by making much Istighfaar (seeking His forgiveness) and having a pure, sincere heart. We must remember that Allah (Almighty) knows whether or not we are sincerely working to improve ourselves and our states, just as He knows whether we are being insincere and trying to dodge, sidestep, circumvent and find a way out from His Commands and Laws. In this way, undoubtedly, the one who strives in Allah’s path and who amasses good deeds will want to ardently one day see His Lord - the very Lord for Whom he sacrificed his energies, friendships, forbidden delights and permissible indulgences, which even though were allowed by the Shariah (Canons of Islamic Law), were disliked by Allah (the All-Knowing, the All-Seeing).
Allah’s Love and Help at the Moment of Death
Allah (Almighty) loves the believer in proportion to his or her obedience to Him and His Final Messenger, Muhammad (peace be upon him). For someone to attain such a lofty and aspired position is a blessing above all blessings, a gift unlike any other, an asset unlike any asset acquired within the slave’s limited and temporary existence within this life, and a refined and pure sweetness unlike any other sweetness found in this fleeting Dunya.
When Allah (the Most Merciful, the Helper, the Protector) loves a slave, He becomes protective of him, so much so that He will prevent any harm from being inflicted on him and reaching him. This is so much so that He even hesitates to take his soul at the time of death, even though it is an unavoidable thing decreed upon all human beings. The words of the Prophet (peace be upon him) are the most concise and descriptive of this fact,
“Allah says: Whoever harms a Wali (ally) of Mine, I declare war against him. My 'Abd (slave/ worshipper) does not draw closer to Me with anything dearer to Me than the religious duties I have mandated upon him. And My 'Abd continues to draw closer to Me with voluntary acts (of worship) until I love him; when I love him, I become his ears with which he hears, his eyes with which he sees, his hand with which he strikes and his foot with which he walks. Would he then ask Me for anything, I surely grant it to him; and would he seek refuge in Me, I surely shelter him.
I do not hesitate in anything I have to do as I hesitate in taking the life of My believing 'Abd: he hates death and I hate to hurt him.” (Al Bukhaari)
In fact, Allah (‘azza wa jall) makes this transition easier on a slave by showing him things which make him wish for his soul to depart more quickly and speedily. The Prophet (peace be upon him) said, “Verily, when death descends upon a believer, and he witnesses things (implying his forthcoming rewards), he wishes that his soul would depart (quickly), and Allah loves to meet him…” (Recorded by al-Bazzar; verified to be authentic.)
When reading about the death of the righteous predecessors of the past, I came to realize what this really means and how their love for Allah (Almighty) manifested itself in their final moments within this life. For example, when al-Hasan ibn ‘Ali (may Allah be pleased with him) was dying, he asked the people to take him out to the hall. Then he said:
“O Lord, I entrust myself to you”. (Mukhtasar Minhaj Al-Qadisin (towards the hereafter) by Ibn Qudamah Al-Maqdisi. Translated by Wa'il 'A.Shihab)
On his deathbed, Muadh ibn Jabal (may Allah be pleased with him) said:
“Look if the day has broken. “
They looked and answered in the negative. Later on, he was informed that it was morning. Then he remarked:
“I seek refuge in Allah from a night whose morning leads to Hell-fire. Welcome to death, an absent visitor and a beloved returning while we are defected. O Lord, I used to fear You, but now I expect good from You. You know that I never loved this world nor (a) long stay in it. I used to observe fasting on extremely hot days, praying during long nights of winter, and joining scholars in their circles of knowledge.” (Ibid)
Fadala ibn Dinar (rahimahullah) said, “I was with Muhammad b. Wasi' when he was very near to death. He began to say,
"Welcome to my Lord's angels! There is no strength nor power except by Allah!"
I smelled the sweetest fragrance that I had ever smelt. Then his eyes glazed over and he died.” ("The Soul’s journey after death" an abridgement of Ibn al-Qayyim's kitabar-ruh.)
Ibn Abi Dunya mentions that on the day 'Umar b. 'Abdul-'Aziz died, he said to those with him,
'Sit with me.'
When they sat down next to him, he said,
'I am the one you commanded and I failed you. You forbade me and I rebelled.'
He said this three times. Then he said,
'But there is no god but Allah.'
Then he lifted his head and stared. They said, 'You are looking very intently, Amir al-Mu'minin.'
He replied,
'I see a presence which is neither man nor jinn.'
Then he died. (Ibid)
When Abdul Azeez ibn Sulayman al-‘Abdi (rahimahullah) died one of his companions saw him in a dream wearing a green garment with a crown of pearls on his head. He asked him how he was and what the experience of the taste of death was like and what things were like where he was. He replied,
'Do not ask about the intensity of the grief and sorrow of death! However, Allah's Mercy concealed all our faults and we encountered nothing but His Bounty.' (Ibid)