It has been narrated on the authority of Sulaiman b. Yasar who said
People dispersed from around Abu Huraira, and Natil, who was from the Syrians. said to him: O Shaikh, relate (to us) a tradition you have heard from the Messenger of Allah (ﷺ). He said: Yes. I heard the Messenger of Allah (ﷺ) say: The first of men (whose case) will be decided on the Day of Judgment will be a man who died as a martyr. He shall be brought (before the Judgment Seat). Allah will make him recount His blessings (i. e. the blessings which He had bestowed upon him) and he will recount them (and admit having enjoyed them in his life). (Then) will Allah say: What did you do (to requite these blessings)? He will say: I fought for Thee until I died as a martyr. Allah will say: You have told a lie. You fought that you might be called a" brave warrior". And you were called so. (Then) orders will be passed against him and he will be dragged with his face downward and cast into Hell. Then will be brought forward a man who acquired knowledge and imparted it (to others) and recited the Qur'an. He will be brought And Allah will make him recount His blessings and he will recount them (and admit having enjoyed them in his lifetime). Then will Allah ask: What did you do (to requite these blessings)? He will say: I acquired knowledge and disseminated it and recited the Qur'an seeking Thy pleasure. Allah will say: You have told a lie. You acquired knowledge so that you might be called" a scholar," and you recited the Qur'an so that it might be said:" He is a Qari" and such has been said. Then orders will be passed against him and he shall be dragged with his face downward and cast into the Fire. Then will be brought a man whom Allah had made abundantly rich and had granted every kind of wealth. He will be brought and Allah will make him recount His blessings and he will recount them and (admit having enjoyed them in his lifetime). Allah will (then) ask: What have you done (to requite these blessings)? He will say: I spent money in every cause in which Thou wished that it should be spent. Allah will say: You are lying. You did (so) that it might be said about (You):" He is a generous fellow" and so it was said. Then will Allah pass orders and he will be dragged with his face downward and thrown into Hell.
This tradition has been handed down through a different chain of transmitters.