Even Muslims who aren't close with the deceased or the family can participate in this ritual, the Salatul Janazah.
Before burial, it's traditional to pray over a Muslim body, no matter how old the person was when he or she died. The prayer should happen immediately after shrouding the body. It usually occurs outside of the mosque and its prayer room, and the prayer should take place at dusk or sunset, if possible, unless the body is decomposing and needs to be buried immediately.
Muslims gather in a group to pray silently that Allah will have mercy on this person and all other dead Muslims. There are only two parts of the prayer said aloud, and we'll get to the funeral service in more detail on the next page.