It is narrated from Sayyiduna Mughirah bin Shu’bah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: The funeral prayer should be offered for a prematurely born, incomplete child, and forgiveness and mercy should be supplicated for his parents.
Hadith Referenceالفتح الربانی / أبواب صلاة الجنازة / 3152
Hadith Gradingمحدثین:صحیح
Hadith Takhrij«حديث صحيح۔ أخرجه الترمذي: 1031، وابن ماجه: 1507، والنسائي: 4/ 56 بلفظ: (( والطفل يصلي عليه۔)) ، (انظر مسند أحمد ترقيم الرسالة: 18162، 18174 ترقیم بيت الأفكار الدولية: 18358»
Brief Explanation
Benefits: … In the light of authentic ahadith, after four months of conception, the soul is breathed into the fetus and it becomes a (living) soul. Therefore, if the pregnancy is miscarried after this period, the funeral prayer (salat al-janazah) is performed for it, in which supplication is made for its parents.