Exodus 17:6-9 English Standard Version (ESV)

6. Behold, I will stand before you there on the rock at Horeb, and you shall strike the rock, and water shall come out of it, and the people will drink.” And Moses did so, in the sight of the elders of Israel.

7. And he called the name of the place Massah and Meribah, because of the quarreling of the people of Israel, and because they tested the Lord by saying, “Is the Lord among us or not?”

8. Then Amalek came and fought with Israel at Rephidim.

9. So Moses said to Joshua, “Choose for us men, and go out and fight with Amalek. Tomorrow I will stand on the top of the hill with the staff of God in my hand.”

Exodus 17