The Shaykh—may Allah have mercy on him—was asked:
Will a young child be brought back to life and questioned, or brought back to life without being questioned? What will he be questioned about? Are those who are subject to religious obligations and those who are not treated alike with regard to being brought back to life and questioned?
He replied:
All praise is due to Allah, Lord of the worlds. Regarding someone who is not subject to religious obligations, such as a young child or a person of unsound mind, scholars hold two views on whether he will be tested in his grave and questioned by Munkar and Nakīr.
The first view is that he will be tested. This is the view of the majority of Ahl al-Sunnah, as reported from them by Abū al-Hasan ibn Abdūs and also mentioned by Abū Hakīm al-Nahrawānī and others.
The second view is that he will not be tested in his grave, as mentioned by Judge Abū Ya‘lā, Ibn ‘Aqīl, and others. They argue that this test applies only to those who were subject to religious obligations in this world.
Those who hold the first view cite as evidence the report in al-Muwatta’ from Abū Hurayrah, may Allah be pleased with him:
“The Prophet, may Allah bless him and grant him peace, offered the funeral prayer for a young child who had never committed a sin and said: ‘O Allah, protect him from the punishment of the grave and the trial of the grave.’”
This indicates that he will undergo the trial.