Abu Dharr reported,

The Prophet ﷺ said, "When the semen has remained in the womb for forty nights, the angel of souls comes to it and ascends with it to the Lord, holding it in his palm. He asks, 'My Lord, this servant of Yours, is it male or female?' Then Allah decrees concerning it whatever He decrees. The angel then asks, 'My Lord, is it to be wretched or blessed?' So what it is to encounter is written between its eyes."The narrator said, Abu Dharr then recited five verses from the opening of Surah at-Taghabun.

Azami 278

Hasan

عن أبي ذر

عن النبي ﷺ قال: ذا مكث المني في الرحم أربعين ليلة أتاه ملك النفوس فعرج به إلى الرب في راحته، فيقول: أي رب عبدك هذا ذكر أم أنثى، فيقضي الله إليه ما هو قاض، ثم يقول: أي رب أشقي أم سعيد؟ فيكتب بين عينيه ما هو لاق. قال: وتلا أبو ذر من فاتحة التغابن خمس آيات.

الأعظمي 278حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Faith in Allah عز وجل
Section
Affirmation of transcendence for Allah the Exalted
Numbering
Jami al-Kamil 278 (2nd edition)
Azami 278