عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «كَتَبَ اللَّهُ مقادير الْخَلَائق قبل أَن يخلق السَّمَوَات وَالْأَرْضَ بِخَمْسِينَ أَلْفَ سَنَةٍ» قَالَ: «وَكَانَ عَرْشُهُ على المَاء» . رَوَاهُ مُسلم
Translation

Sahl b. Sa’d reported God’s messenger as saying, “One man does the deeds of those who go to hell but is one of those who go to paradise, and another does the deeds of those who go to paradise but is one of those who go to hell, for judgment is given according to one’s final actions.” (Bukhari and Muslim).

Comment

The Nature of Final Judgment

This profound hadith from Mishkat al-Masabih 83 addresses the ultimate divine judgment, emphasizing that one's eternal destiny is determined by their final state of faith and deeds at life's conclusion.

The First Case: Outward Sin, Inward Grace

The individual performing hell-bound deeds yet entering paradise demonstrates Allah's boundless mercy. This soul, despite apparent disobedience, maintains essential faith (iman) and receives divine forgiveness through sincere repentance (tawbah) before death.

Scholars explain this may occur through hidden virtues known only to Allah, a deathbed repentance accepted by the Most Merciful, or through divine decree overriding apparent actions due to underlying faith.

The Second Case: Outward Piety, Inward Deficiency

The one performing paradise-worthy deeds yet destined for hell reveals the critical importance of intention (niyyah) and ending life in disbelief. This soul may perform righteous acts for show (riya'), maintain hidden shirk, or ultimately reject faith before death.

As Imam Nawawi comments: "This occurs when one abandons faith at life's end, nullifying all previous good deeds, for disbelief erases what preceded it."

The Principle of Final Actions

The phrase "judgment is given according to one's final actions" establishes the Islamic doctrine of khatimah (seal of deeds). The consistent pattern of one's life and their ultimate ending determines their eternal abode.

Ibn Hajar al-Asqalani explains: "The 'final action' refers to what one dies upon - either faith or disbelief. This is the decisive factor, though it reflects the predominant state of the heart throughout life."

Practical Implications for Believers

This teaching encourages constant self-assessment (muhasabah) and seeking protection from bad endings. The righteous predecessors would frequently supplicate: "O Turner of hearts, make our hearts firm upon Your religion."

It teaches that no one should feel secure from Allah's plan nor despair of His mercy. The believer must combine righteous deeds with sincere faith until death, trusting in divine wisdom and justice.