God’s messenger came out with two books in his hands and asked, “Do you know what these two books are?” We replied, “No, messenger of God, unless you tell us.” Of the one in his right hand he said, “This is a book from the Lord of the universe containing the names of those who will go to paradise, as well as the names of their fathers and their tribes. It is completed to the last man, so there will never be any increase or diminution in their numbers.” Of the one in his left hand he then said, “This is a book from the Lord of the universe containing the names of those who will go to hell, as well as the names of their fathers and their tribes. It is completed to the last man, so there will never be any increase or diminution in their numbers.” His Companions asked, “What then, messenger of God, is the good of doing anything if the matter is already decided?” He replied, “Follow a right course and keep as near to it as you can, for the last act of one who is to go to paradise will be an act appropriate for those who go to paradise no matter what he may have done; but the last act of one who is to go to hell will be an act appropriate for those who go to hell no matter what he may have done.” God’s messenger then made a gesture with his hands throwing the books away and said, “Your Lord has decided everything about mankind; a section will be in paradise and a section in the blaze.”
Muslim b. Yasar said that when ‘Umar b. al-Khattab was questioned about the verse, “When your Lord took their offspring from the backs of the children of Adam...” 1 he replied that he had heard God’s messenger say when he was questioned about it, “God created Adam, then passed His right hand over his back and brought forth from it his offspring, saying, ‘I have created these for paradise and they will do the deeds of those who go to paradise.’ He then passed his hand over his back and brought forth from it his offspring, saying, ‘I have created these for hell and they will do the deeds of those who go to hell’.” A man asked, “What is the good of doing anything, messenger of God?” to which God’s messenger replied, “When God creates a man for paradise He employs him in doing the deeds of those who will go to paradise, so that his final action before death is one of the deeds of those who go to paradise, for which He will bring him into paradise. But when He creates a man for hell He employs him in doing the deeds of those who will go to hell, so that his final action before death is one of the deeds of those who go to hell, for which He will bring him into hell.”
Abu Khizama said that his father asked God’s messenger, “Tell me whether invocations we invoke, medicine we apply and caution we practise can avert anything God has decreed.” He replied, “They are a part of God’s decree ’
‘Ubada b. as-Samit reported God’s messenger as saying, “The first thing God created was the pen. He told it to write and when it asked Him what it should write He told it to write what was decreed, so it wrote what had taken place and what would take place to all eternity.”
Tirmidhi transmitted it, saying that this is a tradition whose isnad is gharib.