Allah’s Messenger صلى الله عليه وسلم said: When Allah created Adam and breathed the spirit into him he sneezed and said, “Praise be to Allah.”
So he praised Allah by His permission and his Lord said to him, “Allah have mercy on you, Adam. Go to those angels (i.e. a company of them who were seated) and say, ‘Peace be upon you’.” He said, “Peace be upon you,” and they replied, “Upon you be peace and Allah’s mercy.”
Then he returned to his Lord who said, “This is your salutation and the salutation of your descendants to one another.”
Then Allah said to him, keeping His hands closed, “Choose which of them you wish.” He said, “I choose my Lord’s right hand, and both of my Lord’s hands are Right and Blessed.” Then He opened it and it contained Adam and his descendants. He asked, “My Lord, what are these?” He replied, “These are your descendants.”
Now every man’s period of life was written on his forehead, and among them there was a man who was the brightest of them (or, one of the brightest of them). He said, “My Lord, who is this?” He replied, “This is your descendant Dawud, and I have recorded his period of life for him as forty years.” He said, “My Lord, increase his life.” But He replied, “That is what I have recorded for him.” He said, “My Lord, I have appointed him sixty years of my life.” He replied, “That is as you wish.”
He then lived in Paradise as long as Allah wished, after which he was sent down from it. Now Adam was reckoning for himself, and when the angel of death came to him, Adam said to him, “You have come before your time. A thousand years have been recorded for me.” He replied, “Certainly, but you appointed sixty years for your descendant Dawud.”
Then he denied, and his descendants denied; and he forgot, and his descendants forgot. The Prophet said that from that day orders were given that a document be drawn up and witnesses be produced.
Transmitted by Tirmidhi. Narrated by Abu Hurayrah