Exodus 17
1The whole congregation of the sons of Israel journeyed from the wilderness of Sin by their stages, at Yahweh's command. They camped at Rephidim, but there was no water for the people to drink. 2The people quarreled with Moses and said, “Give us water to drink!” Moses said to them, “Why do you quarrel with me? Why do you test Yahweh?” 3The people were thirsty for water there, and they grumbled against Moses. They said, “Why did you bring us up out of Egypt to kill me and my sons and my livestock with thirst?” 4Moses cried out to Yahweh, saying, “What shall I do with this people? A little more, and they will stone me!” 5Yahweh said to Moses, “Pass on before the people, and take some of the elders of Israel with you. Take in your hand your staff with which you struck the Nile, and go. 6Look, I will stand before you there on the rock at Horeb. Strike the rock, and water will come out of it, so that the people may drink.” Moses did so in the eyes of the elders of Israel. 7He named the place Massah and Meribah because of the quarreling of the sons of Israel and because they tested Yahweh, saying, “Is Yahweh among us or not?”
8Amalek came and fought with Israel at Rephidim. 9Moses said to Joshua, “Choose men for us, and go out and fight Amalek. Tomorrow I will stand on top of the hill with God's staff in my hand.” 10Joshua did as Moses told him, to fight Amalek, while Moses, Aaron, and Hur went up to the top of the hill. 11Whenever Moses raised his hand, Israel prevailed; whenever he lowered his hand, Amalek prevailed. 12But Moses' hands were heavy. They took a stone and put it under him, and he sat on it. Aaron and Hur supported his hands, one on this side and one on the other, so that his hands were steady until the sun went down. 13Joshua defeated Amalek and his people with the edge of the sword.
14Yahweh said to Moses, “Write this as a memorial in the scroll, and put it in Joshua's hearing: I will surely wipe out the memory of Amalek from under the heavens.” 15Moses built an altar and named it “Yahweh Is My Banner.” 16He said, “For a hand is upon Yah's throne! Yahweh has war with Amalek from generation to generation.”