It is narrated from Sayyiduna Ubayd bin Khalid (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) established brotherhood between two men from among his Companions. Then one of them was martyred (in the path of Allah), and the other lived after him for as long as Allah willed, and then he died. The Companions of the Messenger of Allah (peace and blessings be upon him) began to supplicate for him, and the utmost of their supplication was that Allah Almighty would join him to the rank of his brother who had been martyred. The Messenger of Allah (peace and blessings be upon him) asked: "Which of the two do you consider more excellent?" They said: The one who was martyred. He (peace and blessings be upon him) said: "Do you not give any merit to this one's prayers and fasting? The difference between the two of them is greater than the distance between the heavens and the earth." Thus he (peace and blessings be upon him) gave the one who died (later) precedence over the one who was martyred.
Imam al-Tabarani (may Allah have mercy on him) said: "Only Ubaydullah bin Amr (may Allah have mercy on him) narrated this hadith from Zayd bin Abi Unaysah (may Allah have mercy on him)."
Hadith Referenceالمعجم الأوسط / باب العين / 4358
Hadith Takhrij«أخرجه النسائي فى «المجتبى» برقم: 1984 / 3، والنسائي فى «السنن الكبرى» برقم: 2123، وأبو داود فى «سننه» برقم: 2524، والبيهقي فى «السنن الكبرى» برقم: 6625، وأحمد فى «مسنده» برقم: 16321، 18203، 18204، 18205، والطيالسي فى «مسنده» برقم: 1287، وابن أبي شيبة فى «مصنفه» برقم: 35566، والطحاوي فى «شرح مشكل الآثار» برقم: 2313، 2311، 2312»