It is narrated from Hisham bin Amir (may Allah be pleased with him) that the Ansar came to the Messenger of Allah (peace and blessings be upon him) on the day of Uhud and said: O Messenger of Allah, we have suffered wounds and hardship, so what do you command us? He (peace and blessings be upon him) said: "Dig deep and wide, and put two or three men in one grave." They said: Whom shall we put first in the grave? He (peace and blessings be upon him) said: "The one who knows the most Qur'an." He says: My father was put ahead of two men, or one.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6751