When God perceived that Moses was prepared to die, He said to the angel Gabriel, "Go, fetch Me Moses' soul." But he replied, "How should I presume to approach and take the soul of him that outweighs sixty myriads of mortals!" God then commissioned the angel Michael to fetch Moses' soul, but he amid tears refused on the same grounds as Gabriel. God then said to the angel Zagzagel, "Fetch Me Moses' soul!" He replied, "Lord of the world! I was his teacher and he my disciple, how then should I take his soul!"  Then Samael appeared before God and said: "Lord of the world! Is Moses, Israel's teacher, indeed greater than Adam whom thou didst create in Thine image and Thy likeness? Is Moses greater, perchance, than Thy friend Abraham, who to glorify Thy name cast himself into the fiery furnace? Is Moses greater, perchance, than Isaac, who permitted himself to be bound upon the altar as a sacrifice to Thee? Or is he greater than Thy firstborn Jacob, or than his twelve sons, Thy saplings? Not one of them escaped me, give me therefore permission to fetch Moses' soul." God replied: "Not one of all these equals him. How, too, wouldst thou take his soul? From his face? How couldst thou approach his face that had looked upon My Face! From his hands? Those hands received the Torah, how then shouldst thou be able to approach them! From his feet? His feet touched My clouds, how then shouldst thou be able to approach them! Nay, thou canst not approach him at all." But Samael said, "However it be, I pray Thee, permit me to fetch his soul! " God said, "Thou had My consent." 
Samael now went forth from God in great glee, took his sword, girded himself with cruelty, wrapped himself in wrath, and in a great rage betook himself to Moses. When Samael perceived Moses, he was occupied in writing the Ineffable Name. Dart of fire shot from his mouth, the radiance of his face and of his eyes shone like the sun, so that he seemed like an angel of the hosts of the Lord, and Samael in fear and trembling thought, "It was true when the other angels declared that they could not seize Moses' soul!"
Moses who had known that Samael would come, even before his arrival, now lifted his eyes and looked upon Samael, whereupon Samael's eyes grew dim before the radiance of Moses' countenance. He fell upon his face, and was seized with the woes of a woman giving birth, so that in his terror he could not open his mouth. Moses therefore addressed him, saying: "Samael, Samael! 'There is no peace, saith my God, to the wicked!' Why dost thou stand before me? Get thee hence at once, or I shall cut off thy head." In fear and trembling Samael replied: "Why art thou angry with me, my master, give me thy soul, for thy time to depart from the world is at hand." Moses: "Who sent thee to me?" Samael: "He that created the world and the souls." Moses: "I will not give thee my soul." Samael: "All souls since the creation of the world were delivered into my hands." Moses: "I am greater than all others that came into the world, I have had a greater communion with the spirit of God than thee and thou together." Samael: "Wherein lies thy preeminence?" Moses: "Dost thou not know that I am the son of Amram, that came circumcised out of my mother's womb, that at the age of three days not only walked, but even talked with my parents, that took no milk from my mother until she received her pay from Pharaoh's daughter? When I was three months old, my wisdom was so great that I made prophecies and said, 'I shall hereafter from God's right hand receive the Torah.' At the age of six months I entered Pharaoh's palace and took off the crown from his head. When I was eighty years old, I brought the ten plagues upon Pharaoh and the Egyptians, slew their guardian angel, and led the sixty myriads of Israel out of Egypt. I then clove the sea into twelve parts, led Israel through the midst of them, and drowned the Egyptians in the same, and it was not thou that took their souls, but I. It was I, too, that turned the bitter water into sweet, that mounted into heaven, and there spoke face to face with God! I hewed out two tables of stone, upon which God at my request wrote the Torah. One hundred and twenty days and as many nights did I dwell in heaven, where I dwelled under the Throne of Glory; like an angel during all this time I ate no bread and drank no water. I conquered the inhabitants of heaven, made known there secrets to mankind, received the Torah from God's right hand, and at His command wrote six hundred and thirteen commandments, which I then taught to Israel. I furthermore waged war against the heroes of Sihon and Og, that had been created before the flood and were so tall that the waters of the flood did not even reach their ankles. In battle with them I bade sun and moon to stand still, and with my staff slew the two heroes. Where, perchance, is there in the world a mortal who could do all this? How darest thou, wicked one, presume to wish to seize my pure soul that was given me in holiness and purity by the Lord of holiness and purity? Thou hast no power to sit where I sit, or to stand where I stand. Get thee hence, I will not give thee my soul."
Samael now in terror returned to God and reported Moses' words to Him. God's wrath against Samael was now kindled, and He said to him: "Go, fetch Me Moses soul, for if thou dost not do so, I shall discharge thee from thine office of taking men's souls, and shall invest another with it." Samael implored God, saying: "O Lord of the world, whose deed are terrible, bid me go to Gehenna and there turn uppermost to undermost, and undermost to uppermost, and I shall at once do so without a moment's hesitation, but I cannot appear before Moses." God: "Why not, pray?" Samael: "I cannot do it because he is like the princes in thy great chariot. Lightning-flashes and fiery darts issue from his mouth when he speaks with me, just as it is with the Seraphim when they laud, praise and glorify Thee. I pray Thee, therefore, send me not to him, for I cannot appear before him." But God in wrath said to Samael: "Go, fetch Me Moses' soul," and while he set about to execute God's command, the Lord furthermore said: "Wicked one! Out of the fire of Hell was thou created, and to the fire of Hell shalt thou eventually return. First in great joy didst thou set out to kill Moses, but when thou didst perceive his grandeur and his greatness, thou didst say, 'I cannot undertake anything against him.' It is clear and manifest before Me that thou wilt now return from him a second time in shame and humiliation."
Samael now drew his sword out of its sheath and in a towering fury betook himself to Moses, saying, "Either I shall kill him or he shall kill me." When Moses perceived him he arose in anger, and with his staff in his hand, upon which was engraved the Ineffable Name, set about to drive Samael away. Samael fled in fear, but Moses pursued him, and when he reached him, he struck him with his staff, blinded him with the radiance of his face, and then let him run on, covered with shame and confusion. He was not far from killing him, but a voice resounded from heaven and said, "Let him live, Moses, for the world is in need of him," so Moses had to content himself with Samael's chastisement.