Moses now instructed Joshua in regard to his campaign against Amalek, saying, "Choose us out men and go out, fight with Amalek." The words "choose us" characterize the modesty of Moses, who treated his disciple Joshua as an equal; in these words he has taught us that the honor of our disciples should stand as high as our own. Joshua did not at first want to expose himself to danger and leave the protection of the cloud, but Moses said to him, "Abandon the cloud and set forth against Amalek, if ever thou dost hope to set the crown upon thy head." He commanded him to choose his warriors from among the pious and God-fearing, and promised him that he would set a fast day for the following day, and implore God, in behalf of the good deeds of the Patriarchs and the wives of the Patriarchs, to stand by Israel in this war.
Joshua acted in accordance with these commands  and set out against Amalek, to conquer whom required not only skillful strategy, but also adeptness in the art of magic. For Amalek was a great magician and knew that propitious and the unpropitious hour of each individual, and in this way regulated his attacks against Israel; he attacked that one at night, whose death had been predicted for a night, and him whose death had been preordained for a day did he attack by day.
But in this art, too, Joshua was his match, for he, too, knew how to time properly the attack upon  individuals, and he destroyed Amalek, his sons, the armies he himself commanded, and those under the leadership of his sons. But in the very heat of battle, Joshua treated his enemies humanely, he did not repay like with like. Far was it from him to follow Amalek's example in mutilating the corpses of the enemy. Instead with a sharp sword he cut off the enemies' heads, an execution that does not dishonor.
But only through the aid of Moses, did Joshua with his victory. Moses did not go out into battle, but through his prayer and through his influence upon the people in inspiring them with faith, the battle was won. While the battle raged between Israel and Amalek, Moses was stationed on a height, where, supported by the Levite Aaron and the Judean Hur, the representatives of the two noble tribes Levi and Judah, he fervently implored God's aid. He said: "O Lord of the world! Through me has Thou brought Israel out of Egypt, through me hast Thou cleft the sea, and through me has Thou wrought miracles; so do Thou now work miracles for me, and lend me victory to Israel, for I well know that while all other nations fight only to the sixth hour of the day, this sinful nation stand in battle ranks till sunset." Moses did not consider it sufficient to pray alone to God, but he raised his hands toward heaven as a signal for the whole nation to follow his example and trust in God. As often as he then raised his hands to heaven and the people prayed with him, trusting that God would lend them victory, they were indeed victorious; as often, however, as Moses let down his hands and the people ceased prayer, weakening in their faith in God, Amalek conquered. But it was hard for Moses constantly to raise his hands. This was God's way of punishing him for being somewhat negligent in the preparations for the war against Amalek. Hence Aaron and Hur were obliged to hold up his arms and assist him in his prayer. As, furthermore, he was unable to stand all that time, he seated himself on a stone, disdaining a soft and comfortable seat, saying, "So long as Israel is in distress, I shall share it with them." 
At evenfall, the battle was not yet decided, therefore Moses prayed to God that He might stay the setting of the sun and thus enable Israel to draw the battle to a close. God granted this prayer, for the sun did not set until Israel had completely destroyed their enemy. Thereupon Moses blessed Joshua with the words, "Some day the sun shall stand still for thy sake, as it did to-day for mine," and this blessing was later fulfilled at Gibeon, when the sun stood still to help Joshua in his battle against the Amorites. 
Although Amalek had not received the merited punishment from the hands of Joshua, still his enterprise against Israel had not been entirely unavailing. The miraculous exodus of Israel out of Egypt, and especially the cleaving of the sea, had created such alarm among the heathens, that none among them had dared to approach Israel. But this fear vanished as soon as Amalek attempted to compete in battle with Israel. Although he was terrible beaten, still the fear of the inaccessibility of Israel was gone. It was with Amalek as with that foolhardy wight who plunged into a scalding-hot tub. He scalded himself terribly, yet the tub became cold through his plunge into it. Hence God was not content with the punishment Amalek received in the time of Moses, but swore by His throne and by His right hand that He would never forget Amalek's misdeeds, that in this world as well as in the time of the Messiah He would visit punishment upon him, and would completely exterminate him in the future world. So long as the seed of Amalek exist, the face of God is, as it were, covered, and will only then come to view, when the seed of Amalek shall have been entirely exterminated.
God had at first left the war against Amalek in the hands of His people, therefore He bade Joshua, the future leader of the people, never to forget the war against Amalek; and if Moses had listened intently, he would have perceived from this command of God that Joshua was destined to lead the people into the promised land. But later, when Amalek took part in the destruction of Jerusalem, God Himself took up the war against Amalek, saying, "By My throne I vow not to leave a single descendant of Amalek under the heavens, yea, no one shall even be able to say that this sheep or that wether belonged to an Amalekite." 
God bade Moses impress upon the Jews to repulse no heathen should he desire conversion, but never to accept an Amalekite as a proselyte. It was in consideration of this word of God that David slew the Amalekite, who announced to him the death of Saul and Jonathan; for he saw in him only a heathen, although he appeared in the guise of a Jew. 
Part of the blame for the destruction of Amalek falls upon his father, Eliphaz. He used to say to Amalek: "My son, dost thou indeed know who will posses this world and the future world?" Amalek paid no attention to his allusion to the future fortune of Israel, and his father urged it no more strongly upon him, although it would have been his duty to instruct his son clearly and fully. He should have said to him: "My son, Israel will posses this world as well as the future world; dig wells then for their use and build road for them, so that thou mayest be judged worthy to share in the future world." But as Amalek had not been sufficiently instructed by his father, in his wantonness he undertook to destroy the whole world. God, who tries the reins and the heart, said to him: "O thou fool, I created thee after all the seventy nations, but for thy sins thou shalt be the first to descend into hell." 
To glorify the victory over Amalek, Moses built an altar, which God called "My Miracle," for the miracle God wrought against Amalek in the war of Israel was, as it were, a miracle for God. For so long as the Israelites dwell in sorrow, God feels with them, and a joy for Israel is a joy for God, hence, too, the miraculous victory over Israel's foe was a victory for God.