His statement, “is washed and the funeral prayer is offered over it”: that is, it is also shrouded and buried. The author omitted mention of shrouding and burial because they are understood.
He restricted this ruling to one that has reached four months because, before then, it is not a human being; it does not become a human being until four months have passed. The evidence for this is the hadith of Abdullah ibn Masud, may Allah be pleased with him, in which the Prophet, peace and blessings be upon him, explained: “The fetus remains in its mother’s womb for forty days as a drop of fluid, then it becomes a clinging clot for a like period, then it becomes a morsel of flesh for a like period.” This totals four months. “Then the angel is sent to it, breathes the soul into it, and is commanded with four matters,” (1) and so on.
Accordingly, before this period it is inanimate matter—a piece of flesh—which may be buried anywhere, without washing, shrouding, or funeral prayer. But after four months, it is a human being, as Allah, Most High, says:
“Then We developed him into another creation.” [al-Muminun 23:14]
It is therefore treated as one who died after being born.
The scholars said: It is to be named, because this miscarried fetus will be resurrected on the Day of Resurrection. It must therefore be given a name, since people will be called on the Day of Resurrection by their own names and the names of their fathers; thus, it is named so that it may be called by its name on the Day of Resurrection.
The scholars said: If there is doubt as to whether it is male or female—though this is unlikely, it may sometimes occur—it should be given a name suitable for either sex, such as Hibat Allah, Atiyyat Allah, or Nihlāt Allah, and the like.
If it is male, it is given a male name, such as Abdullah; and if it is female, it is given female names, such as Zaynab and Fatimah.