1 The whole congregation of the Israelis set out from the desert of Sin, traveling from place to place according to the command of the LORD. They camped at Rephidim, but there was no water for the people to drink. 2 The people quarreled with Moses: "Give us water to drink." Moses told them, "Why are you quarreling with me? Why are you testing the LORD?"
3 But the people were thirsty there for water, so they complained against Moses: "Why did you bring us up from Egypt to kill us, our children, and our livestock with thirst?"
4 So Moses cried out to the LORD: "What am I to do with these people? Just a little more and they'll stone me."
5 Then the LORD told Moses, "Go over in front of the people and take some of the elders of Israel with you. Take in your hand the staff with which you struck the Nile, and go. 6 I'll be standing there in front of you on the rock at Horeb. You are to strike the rock and water will come out of it, so the people can drink." Moses did this in front of the elders of Israel. 7 He named the place Massah and Meribah, because the Israelis quarreled and tested the LORD by saying: "Is the LORD really among us or not?"
8 After this, the Amalekites came and fought with the Israelis at Rephidim. 9 Moses told Joshua, "Choose some men for us and go out to fight against the Amalekites. Tomorrow I'll stand on top of the hill with the staff of God in my hand."
10 So Joshua did as Moses told him and fought against the Amalekites, while Moses, Aaron, and Hur went up to the top of the hill. 11 Whenever Moses raised his hand, the Israelis prevailed, but when his hand remained at his side, then the Amalekites prevailed. 12 When Moses' hands became heavy, they took a stone and put it under him, and he sat on it. Aaron and Hur supported his hands, one on one side and one on the other, and so his hands were steady until the sun went down. 13 Joshua defeated Amalek and his army using swords.
14 Then the LORD told Moses, "Write this in a book as a memorial and recite it to Joshua: "I'll certainly wipe out the memory of the Amalekites from under heaven.'"