1. The whole community of the people of Israel moved on from the desert of Sin going from place to place as Yahweh commanded, and encamped at Rephidim. But there was no water to drink.
2. The people complained to Moses and said, "Give us water to drink." But Moses replied, "Why do you find fault with me? Why do you put Yahweh to the test?"
3. But the people thirsted for water there and grumbled against Moses, "Why did you make us leave Egypt to have us die of thirst with our children and our cattle?"
4. So Moses cried to Yahweh, "What shall I do with the people? They are almost ready to stone me!"
5. Yahweh said to Moses, "Go ahead of the people and take with you the elders of Israel. Take with you the staff with which you struck the Nile, and go.
6. I will stand there before you on the rock at Horeb. You will strike the rock and water will flow from it and the people will drink." Moses did this in the presence of the elders of Israel.
7. The place was called Massah and Meribah because of the complaints of the Israelites, who tested Yahweh saying, "Is Yahweh with us or not?"
8. When the Israelites were at Rephidim, the Amalekites came and attacked them.
9. So Moses said to Joshua, "Choose some of our men and go out to fight the Amalekites in the morning. As for me, I will stand with God's staff in my hand at the top of the hill."
10. Joshua fought the Amalekites as Moses had directed, while Moses, Aaron and Hur went to the top of the hill.
11. It happened that when Moses raised his hands, the Israelites would win but when he lowered them, the Amalekites would have the advantage.
12. As Moses' arms grew weary they placed a stone for him to sit on while Aaron and Hur on either side held up his arms which remained steadily raised until sunset.
13. For his part Joshua mowed down Amalek and his people with the sword.
14. Yahweh then instructed Moses, "Write this in a book as something to be remembered, and make it known in the hearing of Joshua that I will wipe out the remembrance of Amalek from under heaven."
15. After that Moses built an altar and called it 'Yahweh is my banner,'
16. for he said, "Raise up the standard of Yahweh; Yahweh is at war with the Amalekites from generation to generation."