Fiqh-us-Sunnah Volume 4, Funerals and Dhikr, Fiqh 4.073.

Section : Burying More than One Body in One Grave.

From the example of early generations, we learn that one body is to be buried in a grave. It is disliked if more than one body is buried in a grave, unless there is a large number of corpses, and there is a scarcity of graves, and it is impossible to bury them separately. In such a case, it is permissible to bury more than one body in a grave. This is based on a hadith reported by Ahmad and Tirmizhi, who said, “The Ansar came to the Prophet, peace be upon him, on the day of the Battle of Uhud, saying: ‘O Allah’s Messenger! We are afflicted with physical injury and we are tired, what do you command us to do?’ The Prophet, peace be upon him, said: ‘Dig it, enlarge it, and deepen it, then place two or three men in one grave.’ They asked: ‘Whom should we put in first?’ He said: ‘The one who knows the most Qur’an’.” Tirmizhi stated that it is a sound hadith. ‘Abd-ur Razzaq reported from Wathilah ibn al-Asqa’ with a sound chain of narrators that, “a man and a woman were buried together in the same grave. The man would be placed first, and then the woman behind him.”