It is narrated from Abu al-Mundhir (may Allah be pleased with him) that a man came to the Prophet (peace and blessings be upon him) and said: O Messenger of Allah! So-and-so has died; lead the funeral prayer over him. At this Umar (may Allah be pleased with him) said: He is a wicked man; do not lead the funeral prayer over him. The man said: O Messenger of Allah! Do you not remember the night when this man was among the guards with you? So the Messenger of Allah (peace and blessings be upon him) stood up and led the funeral prayer over the deceased. Then he (peace and blessings be upon him) followed him until, when he reached his grave, he sat down; and when they had finished burying him, he threw three handfuls of earth. Then he said: "People speak ill of you, and I speak well of you." Umar (may Allah be pleased with him) said: How is that, O Messenger of Allah? The Prophet (peace and blessings be upon him) said: "Leave us alone, O Ibn al-Khattab! Whoever strives (does jihad) in the path of Allah, Paradise becomes obligatory for him."
Hadith Referenceالمعجم الكبير للطبراني / مسند من يعرف بالكنى / 19049