Directed by God, the whole company of Israel moved on by stages from the Wilderness of Sin. They set camp at Rephidim. And there wasn't a drop of water for the people to drink.
The people took Moses to task: "Give us water to drink." But Moses said, "Why pester me? Why are you testing God?"
But the people were thirsty for water there. They complained to Moses, "Why did you take us from Egypt and drag us out here with our children and animals to die of thirst?"
Moses cried out in prayer to God, "What can I do with these people? Any minute now they'll kill me!"
God said to Moses, "Go on out ahead of the people, taking with you some of the elders of Israel. Take the staff you used to strike the Nile. And go.
I'm going to be present before you there on the rock at Horeb. You are to strike the rock. Water will gush out of it and the people will drink."
He named the place Massah (Testing-Place) and Meribah (Quarreling) because of the quarreling of the Israelites and because of their testing of God when they said, "Is God here with us, or not?"
Amalek came and fought Israel at Rephidim.
Moses ordered Joshua: "Select some men for us and go out and fight Amalek. Tomorrow I will take my stand on top of the hill holding God's staff."
Joshua did what Moses ordered in order to fight Amalek. And Moses, Aaron, and Hur went to the top of the hill.
It turned out that whenever Moses raised his hands, Israel was winning, but whenever he lowered his hands, Amalek was winning.
But Moses' hands got tired. So they got a stone and set it under him. He sat on it and Aaron and Hur held up his hands, one on each side. So his hands remained steady until the sun went down.
Joshua defeated Amalek and its army in battle.
God said to Moses, "Write this up as a reminder to Joshua, to keep it before him, because I will most certainly wipe the very memory of Amalek off the face of the Earth."
Moses built an altar and named it "God My Banner."
He said, Salute God's rule! God at war with Amalek Always and forever!