Maliks Muwatta Book 016, Hadith Number 017.

Section : What to Say in the Prayer for the Dead.

Yahya related to me from Malik from Said ibn Abi Said al-Maqburi from his father that he had asked Abu Hurayra, "How do you pray over the dead?" and Abu Hurayra replied, "By the Life of Allah, I will tell you! I follow with the family and when the corpse is put down I say 'Allah is greater' and praise Allah and ask for blessings on His Prophet. Then I say, 'O Allah, he is Your slave and the son of Your male slave and Your female slave. He used to testify that there is no god but You and that Muhammad is Your slave and Your Messenger, and You know that best. O Allah, if he acted well, then increase for him his good action, and if he acted wrongly, then overlook his wrong actions. O Allah, do not deprive us of his reward, and do not try us after him.'"

Allahumma inna huwa abduka wa'bnu abdika wa'bnu amatika. Kana yash-hadu an la ilaha illa ant wa anna Muhammadan abduka wa rasooluka, wa anta alamu bihi. Allahumma in kana muhsinan zid fi ihsanihi, wa in kana musiyan fa tajawaz an sayatihi. Allahumma la tahrimna ajrahu wa lataftina badahu.