During the last moments of man’s life, angles will arrive and stand on his right side. Likewise, the Satan will also approach and stand on the left side of the shoulder. (Biharul Anwaar, Vol: 3, Chapter: Malak-ul-Maut)
The job of Satan is to deceive and betray, particularly at the time of death, so that, if the person has any faith, it can be destroyed.
The scale of man’s luck or misfortune is his last word and deed. The way in which he lives his life is the same state in which he will die. Moreover, it will be his state when he will be made to rise in Qiyamat. His wish at the time of his death will be what it was during his life. So, if in his heart there was an aspiration to see the handsomeness of Hazrat Amirul Momineen (a.s.) he will be able to observe that beauty in the last moments. But if, God forbid, his wish throughout his life was only the fulfillment of desire and passion, then the same lust will become more intense at the time of death. However, the one with full faith will be protected, as promised by the Almighty and Satan will not be able to gain control.
“Allah keeps firm those who believe, with the firm word, in worldly life and in the Hereafter. And Allah sends astray the wrongdoers. And Allah does what He wills.” (Surah Ibrahim, ayat 27)
When Abu Zakaria Raazi was about to die, those sitting around him asked him to recite, “Laa Ilaha Illallah!” He replied, “I will not recite.” Then he became unconscious. When he gained sense he said, “Just now a man had come to me who said, ‘if you wish to be lucky and fortunate then say, “Isa is the son of God.” I said, “I will not say.” After a number of requests and denials that fellow said, “Okay then say, there is no God, but Allah. Yet I said, “Since you are asking me to say so I will not. Suddenly there appeared a weapon which killed that fellow. Now I am conscious and am reciting the Kalimah.” Then he recited Shahaadatain and passed away.
Source: Maad, page 22 by Ayatollah Dastaghaib Shirazi (a.r)
Verily, how Satan can subdue a man who had believed that there is only one God at the time of his death? Of course, the man who has been the follower of devil throughout his life will be a companion of the devil on his deathbed too.
May Allah keep us guided on the right path and grant us taufiq to be among the followers of Muhammad (saww) and His pure Ahlebayt (asws).