Comprehensive Chapter on Funeral Rites
According to Mālik and the majority of the scholars of Medina, when a person who is in a state of ihram dies, he is treated exactly like one who is not in ihram with respect to the ritual washing and the shroud: his head and face are covered, and the same amount of perfume is mixed into his ḥinūṭ (the aromatic substances placed among the shroud) as would be used for anyone else, provided that the person performing these preparations is not himself in ihram.
If a community is forced by circumstance to bury several people in a single pit or grave, that is permissible. The body placed nearest the qiblah should be the one who is the most proficient reciter of the Qur’an, the most virtuous, and the most learned in the law. In a common grave the man is positioned in front of the woman toward the qiblah, just as he would stand ahead of her when leading her in prayer.
A person who merely sees a funeral procession is not required to stand for it. Whoever accompanies a bier should not leave until he has performed the funeral prayer over it, and whoever has prayed over it should not attend to any other matters until the family give permission—unless the waiting becomes unduly long and his remaining seated would cause him to miss something important to his religious or worldly interests.
There is no blame on anyone who performs the funeral prayer for the deceased inside the mosque, and in our view this is preferable.