From the wilderness of Sin the whole Israelite community continued by stages as the Lord would command. They encamped at Rephidim, and there was no water for the people to drink. 2 The people quarreled with Moses. "Give us water to drink," they said; and Moses replied to them, "Why do you quarrel with me? Why do you try the Lord?" 3 But the people thirsted there for water; and the people grumbled against Moses and said, "Why did you bring us up from Egypt, to kill us and our children and livestock with thirst?" 4 Moses cried out to the Lord, saying, "What shall I do with this people? Before long they will be stoning me!" 5 Then the Lord said to Moses, "Pass before the people; take with you some of the elders of Israel, and take along the rod with which you struck the Nile, and set out. 6 I will be standing there before you on the rock at Horeb. Strike the rock and water will issue from it, and the people will drink." And Moses did so in the sight of the elders of Israel. 7 The place was named Massah and Meribah, because the Israelites quarreled and because they tried the Lord, saying, "Is the Lord present among us or not?"
8 Amalek came and fought with Israel at Rephidim. 9 Moses said to Joshua, "Pick some men for us, and go out and do battle with Amalek. Tomorrow I will station myself on the top of the hill, with the rod of God in my hand." 10 Joshua did as Moses told him and fought with Amalek, while Moses, Aaron, and Hur went up to the top of the hill. 11 Then, whenever Moses held up his hand, Israel prevailed; but whenever he let down his hand, Amalek prevailed. 12 But Moses' hands grew heavy; so they took a stone and put it under him and he sat on it, while Aaron and Hur, one on each side, supported his hands; thus his hands remained steady until the sun set. 13 And Joshua overwhelmed the people of Amalek with the sword.