Exodus 17
1 The whole community of the Israelites set out from the wilderness of Sin, stage by stage, as the LORD commanded, and they camped at Rephidim. There was no water for the people to drink. 2 The people quarreled with Moses and said, "Give us water, and let us drink." Moses said to them, "Why are you quarreling with me? Why are you testing the LORD?" 3 The people were thirsty there for water, and they grumbled against Moses. They said, "Why is it that you brought us up out of Egypt to make me and my children and my livestock die of thirst?" 4 Moses cried out to the LORD, "What shall I do with these people? A little more and they will stone me." 5 The LORD said to Moses, "Go on ahead of the people, and take some of the elders of Israel with you. Take in your hand the staff you struck the Nile with, and go. 6 Look, I am standing there in front of you on the rock at Horeb. You shall strike the rock, and water will come out of it, and the people will drink." Moses did so while the elders of Israel watched. 7 He named the place Massah and Meribah, because the Israelites quarreled and because they tested the LORD, saying, "Is the LORD among us or not?"
8 Then Amalek came and fought with Israel at Rephidim. 9 Moses said to Joshua, "Choose men for us, and go out and fight against Amalek. Tomorrow I will take my stand on the top of the hill, with the staff of God in my hand." 10 Joshua did as Moses had told him, to fight against Amalek, and Moses, Aaron, and Hur went up to the top of the hill. 11 Whenever Moses held up his hand, Israel prevailed, and whenever he let his hand rest, Amalek prevailed. 12 Moses' hands grew heavy. They took a stone and put it under him, and he sat on it. Aaron and Hur held up his hands, one on one side and one on the other, and his hands stayed firm until the sun went down. 13 Joshua weakened Amalek and his people with the sword.
14 The LORD said to Moses, "Write this in the scroll as a memorial, and put it in Joshua's ears. For I will completely wipe out the remembrance of Amalek from under the skies." 15 Moses built an altar and named it "The LORD Is My Banner." 16 He said, "For a hand is on the throne of the LORD: the LORD has war against Amalek from generation to generation."