1 From the wilderness of Sin the whole Israelite community journeyed by stages, as the Lord directed, and encamped at Rephidim.But there was no water for the people to drink,
2 and so they quarreled with Moses and said, “Give us water to drink.” Moses replied to them, “Why do you quarrel with me? Why do you put the Lord to a test?”
3 Here, then, in their thirst for water, the people grumbled against Moses, saying, “Why then did you bring us up out of Egypt? To have us die of thirst with our children and our livestock?”
4 So Moses cried out to the Lord, “What shall I do with this people? A little more and they will stone me!”
5 The Lord answered Moses: Go on ahead of the people, and take along with you some of the elders of Israel, holding in your hand, as you go, the staff with which you struck the Nile.
6 I will be standing there in front of you on the rock in Horeb. Strike the rock, and the water will flow from it for the people to drink. Moses did this, in the sight of the elders of Israel.
7 The place was named Massah and Meribah, because the Israelites quarreled there and tested the Lord, saying, “Is the Lord in our midst or not?”
8 Then Amalek came and waged war against Israel in Rephidim.
9 So Moses said to Joshua, “Choose some men for us, and tomorrow go out and engage Amalek in battle. I will be standing on top of the hill with the staff of God in my hand.”
10 Joshua did as Moses told him: he engaged Amalek in battle while Moses, Aaron, and Hur climbed to the top of the hill.
11 As long as Moses kept his hands raised up, Israel had the better of the fight, but when he let his hands rest, Amalek had the better of the fight.
12 Moses’ hands, however, grew tired; so they took a rock and put it under him and he sat on it. Meanwhile Aaron and Hur supported his hands, one on one side and one on the other, so that his hands remained steady until sunset.
13 And Joshua defeated Amalek and his people with the sword.
14 Then the Lord said to Moses: Write this down in a book as something to be remembered, and recite it to Joshua: I will completely blot out the memory of Amalek from under the heavens.
15 Moses built an altar there, which he named Yahweh-nissi;
16 for he said, “Take up the banner of the Lord! The Lord has a war against Amalek through the ages.”