5 Adonai said to Moses, “Walk before the people, and take of the elders of Israel with you, along with your staff with which you struck the river. Take it in your hand and go.
6 Behold, I will stand before you, there upon the rock in Horeb. You are to strike the rock, and water will come out of it so that the people can drink.” Then Moses did just so in the eyes of the elders of Israel.
7 The name of the place was called Massah and Meribah, because of the quarreling of Bnei-Yisrael, and because they tested Adonai saying, “Is Adonai among us, or not?”
8 Then the Amalekites came and fought with Israel at Rephidim.
9 Moses said to Joshua, “Choose men, go out, and fight the Amalekites. Tomorrow I will stand on the top of the hill with the staff of God in my hand.”
10 So Joshua did as Moses said, and fought the Amalekites, while Moses, Aaron and Hur went up to the top of the hill.
11 When Moses held up his hand, Israel prevailed. But when he let down his hand, the Amalekites prevailed.