He was asked:
Concerning a young child and an infant: if he dies, will he be tested? And so forth…
(1)
Withholding judgment concerning them and saying, “Allah knows best what they would have done.” A fuller discussion belongs elsewhere.
When a child dies, is he tested in his grave and questioned by Munkar and Nakīr? There are two views within the school of Ahmad and among others.
The first is that he is not tested, and that this trial applies only to those who were subject to religious obligations in this world. A group of scholars held this view, including al-Qādī Abū Yaʿlā and Ibn ʿAqīl.
The second is that children are tested. This was mentioned by Abū Hakīm al-Hamdānī and Abū al-Hasan ibn ʿAbdūs, who also transmitted it from the scholars of al-Shāfiʿī’s school. The question of “prompting the young child and the mentally unsound after burial” follows this distinction: whoever holds that the deceased is tested in the grave prompts him, while whoever holds that he is not tested does not prompt him.
Mālik and others narrated from Abū Hurayrah, may Allah be pleased with him:
“The Prophet, may Allah bless him and grant him peace, offered the funeral prayer over a child and said, ‘O Allah, protect him from the torment of the grave and the trial of the grave.’”
This view accords with the position that they will be tested in the Hereafter and will be subject to religious obligations on the Day of Resurrection, as is the view of most scholars