Talha ibn ‘Ubaydallah (radhiallahu `anhu) reported that two men came to the Prophet (sallallahu `alayhi wa sallam) who had accepted Islam at the same time. One of them used to partake in Jihad more-so than the other, and so (one day) he fought in a battle and was martyred therein. The other remained behind him for another year, and then he passed away.
Talha said, ‘I saw in my dream that I was at the door of Paradise when behold, I was with both of them (the two men). Someone came out of Paradise and allowed the man who passed away later to enter first. Then he came out again and allowed the martyred one to enter. Then he returned and said to me, ‘Go back, for your time has not come yet.’
Talha woke up and began to inform others about this and they were all surprised. This reached the Messenger of Allah (sallallahu `alayhi wa sallam) and when they informed him of it, he said:
من أي ذلك تعجبون؟ قالوا: يا رسول اللهّ هذا كان أشد الرجلين اجتهاداً ثم استشهد ودخل هذا الآخر الجنة قبله فقال رسول الله (صلى الله عليه وسلم) : أليس قد مكث هذا بعده سنة؟ قالوا: بلى. قال: أدرك رمضان فصام وصلى كذا وكذا من سجدة في السنة؟ قالوا: بلى. قال رسول الله (صلى الله عليه وسلم): فما بينهما أبعد مما بين السماء والأرض
He (sallallahu `alayhi wa sallam) said, ‘What are you surprised about?’ They said, ‘O Messenger of Allah! Out of them both, this one strove harder (in Jihad) then he was martyred but this other one was entered into Paradise before him.’ The Messenger of Allah (sallallahu `alayhi wa sallam) said, ‘Did he not remain behind him for one year?’ They said, ‘Yes (he did).’ He said, ‘Did he not reach Ramadan, fast and pray with such and such number of prostrations in the year?’ They said, ‘Yes.’ The Messenger of Allah (sallallahu `alayhi wa sallam) said, ‘So the difference between them is greater than what is between the heavens and the earth.’