«إن الله تعالى وكل بالرحم ملكا يقول: أي رب نطفة أي رب علقة أي رب مضغة فإذا أراد الله أن يقضي خلقها قال: أي رب شقي أم سعيد؟ ذكر أو أنثى؟ فما الرزق؟ فما الأجل؟ فيكتب كذلك في بطن أمه»
The Prophet (peace and blessings be upon him) said:
"Indeed, Allah Almighty has appointed an angel over the womb, who says: 'O my Lord, (now) it is a drop of fluid. O my Lord, (now) it is a clinging clot. O my Lord, (now) it is a lump of flesh.' Then, when Allah Almighty wishes to decree its creation, the angel asks: 'O my Lord, will it be wretched or blessed? Male or female? What will its provision be? And what will its lifespan be?' So all of this is written while it is still in its mother's womb."
Hadith Referenceصحیح الجامع الصغیر / حرف الألف / 1837