When Moses had finished looking upon the land and the future, he was one hour nearer to death. A voice sounded from heaven and said, "Make no fruitless endeavors to live." Moses, however, did not desist from prayer, saying to God: "Lord of the world! Let me stay on this side of the Jordan with the sons of Reuben and the sons of God, that I may be as one of them, while Joshua as king at the head of Israel shall enter into the land beyond the Jordan." God replied: "Dost thou wish Me to make as naught the words in the Torah that read, 'Three times in the year all thy males shall appear before the Lord God?' If Israel sees that thou dost not make a pilgrimage to the sanctuary, they will say, 'If Moses, through whom the Torah and the laws were given to us, does not make the pilgrimage to the sanctuary, how much less do we need to do so!' Thou wouldst then cause nonobservance of My commandments. I have, furthermore, written in the Torah through thee, 'At the end of every seven years, in the set time of the year of release, when all Israel is come to appear before the Lord thy God, in the place which He shall choose, thou shalt read this law before all Israel in their hearing.' If thou wert to live thou shouldst put Joshua's authority in the eyes of all Israel to naught, for they would say, 'Instead of learning the Torah and hearing it from the mouth of the disciple, let us rather go to the teacher and learn from him.' Israel will then abandon Joshua and go to thee, so that thou wouldst cause rebellion against My Torah, in which is written that the king shall read before all Israel the Torah in the set time of the year of release." 
In the meanwhile still another hour had passed, and a voice sounded from heaven and said: "How long wilt thou endeavor in vain to avert the sentence? Thou has not only two hours more of life." The wicked Samael, head of evil spirits, had eagerly awaited the moment of Moses' death, for he hoped to take his soul like that of all other mortals, and he said continually, "When will the moment be at hand when Michael shall weep and I shall triumph?" When now only two hours remained before Moses' death, Michael, Israel's guardian angel, began to weep, and Samael was jubilant, for now the moment he had awaited so long was very close. But Michael said to Samael: "'Rejoice not against me, mine enemy: when I fall, I shall arise; when I sit in darkness, the Lord shall be a light unto me.' Even if I fell on account of Moses's death, I shall arise again through Joshua when he will conquer the one and thirty kings of Palestine. Even if I sit in darkness owing to the destruction of the first and second Temples, the Lord shall be my light on the day of the Messiah."
In the meanwhile still another hour had passed, and a voice resounded from heaven and said, "Moses, thou hast only one hour more of life!" Moses thereupon said: "O Lord of the world! Even if Thou wilt not let me enter into the land of Israel, leave me at least in this world, that I may live, and not die." God replied, "If I should not let thee die in this world, how then can I revive thee hereafter for the future world? Thou wouldst, moreover, then give the lie to the Torah, for through thee I wrote therein, 'neither is there any that can deliver out of My hand.'" Moses continued to pray: "O Lord of the world! If thou dost not permit me to enter into the land of Israel, let me live like the beasts of the field, and feed on herbs, and drink water, let me live and see the world: let me be as one of these." But God said, "Let it suffice thee!" Still Moses continued: "If Thou wilt not grant me this, let me at least live in this world like a bird that flies in the four directions of the world, and each day gathers its food from the ground, drinks water out of the streams, and at eve returns to its nest." But even this last prayer of his was denied, for God said, "Thou hast already made too many words." 
Moses now raised up his voice in weeping, and said, "To whom shall I go that will now implore mercy to me?" He went to every work of creation and said, "Implore mercy for me." But all replied: "We cannot even implore mercy for ourselves, for God 'hath made everything beautiful in its time,' but afterward, 'all go unto one place, all are of the dust, and all turn to dust again,' 'for the heaven shall vanish away like smoke, and the earth shall wax old like a garment.'"
When Moses saw that none of the works of creation could aid him, he said: "He is 'the Rock, His work is perfect, for all His ways are judgement: A God of faithfulness and without iniquity, just and right is He.'"
When Moses saw that he could not escape death, he called Joshua, and in the presence of all Israel addressed him as follows: "Behold, my son, the people that I deliver into thy hands, is the people of the Lord. It is still in its youth, and hence is inexperienced in the observance of its commandments; beware, therefore, lest thou speak harshly to them, for they are the children of the Holy One, who called them, 'My firstborn son, Israel'; and He loved them before all other nations." But God, on the other hand, at once said to Joshua: "Joshua, thy teacher Moses has transferred his office to thee. Follow now in his footsteps, take a rod and hit upon the head, 'Israel is a child, hence I love him,' and 'withhold not correction from the child.'" 
Joshua now said to Moses: "O my teacher Moses, what will become of me? If I give to the one a share upon a mountain, he will be sure to want one in the valley, and he to whom I give his share in the valley will wish it to be upon a mountain." Moses, however, quieted him, saying, "Be not afraid, for God hath assured me that there will be peace at the distribution of the land." Then Moses said: "Question me regarding all the laws that are not quite clear to thee, for I shall be taken from thee, and thou shalt see me no more." Joshua replied, "When, O my master, by night or by day, have I ever left thee, that I should be in doubt concerning anything that thou hast taught me?" Moses said, "Even if thou hast no questions to ask to me, come hither, that I may kiss thee." Joshua went to Moses, who kissed him and wept upon his neck, and a second time blessed him, saying, "Mayest thou be at peace, and Israel be at peace with thee."