Hadith 12157

(حديث قدسي) حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ ، حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ أَبِي بَكْرٍ ، عَنْ أَنَسٍ ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ : " إِنَّ اللَّهَ عَزَّ وَجَلَّ وَكَّلَ بِالرَّحِمِ مَلَكًا ، قَالَ : أَيْ رَبِّ نُطْفَةٌ ، أَيْ رَبِّ عَلَقَةٌ ، أَيْ رَبِّ مُضْغَةٌ ، فَإِذَا قَضَى الرَّبُّ عَزَّ وَجَلَّ خَلْقَهَا ، قَالَ : أَيْ رَبِّ أَشَقِيٌّ أَوْ سَعِيدٌ ؟ ذَكَرًا أَوْ أُنْثَى ؟ فَمَا الرِّزْقُ وَمَا الْأَجَلُ ؟ ، قَالَ : فَيَكْتُبُ كَذَلِكَ فِي بَطْنِ أُمِّهِ " .
It is narrated from Hazrat Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: Allah Almighty has appointed an angel over the womb of the mother, who at its appointed time keeps saying: O Lord! Now it has become a drop of fluid. O Lord! Now it has become a clot of flesh. Then when Allah intends to create it, the angel asks: O Lord! Will it be wretched or blessed? Will it be male or female? And how long will its lifespan be? All these things are written in the mother's womb.
Hadith Reference مسند احمد / مسند المكثرين من الصحابة / 12157
Hadith Grading حکم دارالسلام: إسناده صحيح ، خ : 3333 ، م: 2646