‘Umar ibn Ḥafṣ narrated to us; my father narrated to us; al-A’mash narrated to us; Zayd ibn Wahb narrated to us;
‘Abdullāh narrated to us: The Messenger of Allāh ﷺ — and he is the truthful, the believed — said: Indeed, each one of you is gathered in his mother’s womb for forty days; then he becomes a clinging clot for a similar period; then he becomes a lump of flesh for a similar period. Then, Allāh sends to him an angel with four words, and it is written: his deeds, his lifespan, his provision, and whether he will be unhappy or happy. Then, the soul is breathed into him. By Allāh, a man may perform the deeds of the people of the Fire until there is only a cubit between him and it, then what has been written overtakes him, so he performs the deeds of the people of Paradise and enters it. And a man may perform the deeds of the people of Paradise until there is only a cubit between him and it, then what has been written overtakes him, so he performs the deeds of the people of the Fire and enters it.”
حَدَّثَنَا عُمَرُ بْنُ حَفْصٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا الأَعْمَشُ، حَدَّثَنَا زَيْدُ بْنُ وَهْبٍ، حَدَّثَنَا عَبْدُ اللَّهِ، حَدَّثَنَا
رَسُولُ اللَّهِ صلى الله عليه وسلم وَهْوَ الصَّادِقُ الْمَصْدُوقُ إِنَّ أَحَدَكُمْ يُجْمَعُ فِي بَطْنِ أُمِّهِ أَرْبَعِينَ يَوْمًا، ثُمَّ يَكُونُ عَلَقَةً مِثْلَ ذَلِكَ، ثُمَّ يَكُونُ مُضْغَةً مِثْلَ ذَلِكَ، ثُمَّ يَبْعَثُ اللَّهُ إِلَيْهِ مَلَكًا بِأَرْبَعِ كَلِمَاتٍ، فَيُكْتَبُ عَمَلُهُ وَأَجَلُهُ وَرِزْقُهُ وَشَقِيٌّ أَوْ سَعِيدٌ، ثُمَّ يُنْفَخُ فِيهِ الرُّوحُ، فَإِنَّ الرَّجُلَ لَيَعْمَلُ بِعَمَلِ أَهْلِ النَّارِ حَتَّى مَا يَكُونُ بَيْنَهُ وَبَيْنَهَا إِلاَّ ذِرَاعٌ، فَيَسْبِقُ عَلَيْهِ الْكِتَابُ فَيَعْمَلُ بِعَمَلِ أَهْلِ الْجَنَّةِ، فَيَدْخُلُ الْجَنَّةَ، وَإِنَّ الرَّجُلَ لَيَعْمَلُ بِعَمَلِ أَهْلِ الْجَنَّةِ، حَتَّى مَا يَكُونُ بَيْنَهُ وَبَيْنَهَا إِلاَّ ذِرَاعٌ فَيَسْبِقُ عَلَيْهِ الْكِتَابُ، فَيَعْمَلُ بِعَمَلِ أَهْلِ النَّارِ فَيَدْخُلُ النَّارَ
Reference: Sahih Al Bukhari 3332