Jami` at-Tirmidhi, Book 47, Hadith 3356 (In-Book)

Narrated Abu Hurairah: that the Messenger of Allah said: "When Allah created Adam He wiped his back and every person that He created among his offspring until the Day of Resurrection fell out of his back. He placed a ray of light between the eyes of every person. Then He showed them to Adam and he said: 'O Lord! Who are these people?' He said: 'These are your offspring.' He saw one of them whose ray between his eyes amazed him, so he said: 'O Lord! Who is this?' He said: 'This is a man from the latter nations of your offspring called Dawud.' He said: 'Lord! How long did You make his lifespan?' He said: 'Sixty years.' He said: 'O Lord! Add forty years from my life to his.' So at the end of Adam's life, the Angel of death of came to him, and he said: 'Do I not have forty years remaining?' He said: 'Did you not give them to your son Dawud?'" He said: "Adam denied, so his offspring denied, and Adam forgot and his offspring forgot, and Adam sinned, so his offspring sinned."

حَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ، حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا هِشَامُ بْنُ سَعْدٍ، عَنْ زَيْدِ بْنِ أَسْلَمَ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لَمَّا خَلَقَ اللَّهُ آدَمَ مَسَحَ ظَهْرَهُ فَسَقَطَ مِنْ ظَهْرِهِ كُلُّ نَسَمَةٍ هُوَ خَالِقُهَا مِنْ ذُرِّيَّتِهِ إِلَى يَوْمِ الْقِيَامَةِ وَجَعَلَ بَيْنَ عَيْنَىْ كُلِّ إِنْسَانٍ مِنْهُمْ وَبِيصًا مِنْ نُورٍ ثُمَّ عَرَضَهُمْ عَلَى آدَمَ فَقَالَ أَىْ رَبِّ مَنْ هَؤُلاَءِ قَالَ هَؤُلاَءِ ذُرِّيَّتُكَ فَرَأَى رَجُلاً مِنْهُمْ فَأَعْجَبَهُ وَبِيصُ مَا بَيْنَ عَيْنَيْهِ فَقَالَ أَىْ رَبِّ مَنْ هَذَا فَقَالَ هَذَا رَجُلٌ مِنْ آخِرِ الأُمَمِ مِنْ ذُرِّيَّتِكَ يُقَالُ لَهُ دَاوُدُ ‏.‏ فَقَالَ رَبِّ كَمْ جَعَلْتَ عُمْرَهُ قَالَ سِتِّينَ سَنَةً قَالَ أَىْ رَبِّ زِدْهُ مِنْ عُمْرِي أَرْبَعِينَ سَنَةً ‏.‏ فَلَمَّا انْقَضَى عُمْرُ آدَمَ جَاءَهُ مَلَكُ الْمَوْتِ فَقَالَ أَوَلَمْ يَبْقَ مِنْ عُمْرِي أَرْبَعُونَ سَنَةً قَالَ أَوَلَمْ تُعْطِهَا ابْنَكَ دَاوُدَ قَالَ فَجَحَدَ آدَمُ فَجَحَدَتْ ذُرِّيَّتُهُ وَنَسِيَ آدَمُ فَنَسِيَتْ ذُرِّيَّتُهُ وَخَطِئَ آدَمُ فَخَطِئَتْ ذُرِّيَّتُهُ ‏" ‏ ‏.‏ قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ ‏.‏ وَقَدْ رُوِيَ مِنْ غَيْرِ وَجْهٍ عَنْ أَبِي هُرَيْرَةَ عَنِ النَّبِيِّ صلى الله عليه وسلم ‏.‏

sunnah.com