5 And Yahweh said to Moses, “Go on before the people and take with you some from the elders of Israel, and the staff with which you struck the Nile take in your hand, and go.
6 Look, I will be standing before you there on the rock in Horeb, and you will strike the rock, and water will come out from it, and the people will drink.” And Moses did so before the eyes of the elders of Israel.
7 And he called the name of the place Massah and Meribah because of the quarrel of the Israelites and because of their testing Yahweh by saying, “Is Yahweh in our midst or not?”
8 And Amalek came and fought with Israel at Rephidim.
9 And Moses said to Joshua, “Choose men for us, and go out, fight against Amalek tomorrow. I will be standing on the top of the hill, and the staff of God will be in my hand.”
10 And Joshua did as Moses had said to him to fight with Amalek. And Moses, Aaron, and Hur went up to the top of the hill.
11 And when Moses raised his hand, Israel would prevail, but when he rested his hand, Amalek would prevail.