The whole Israelite community left the desert of Sin, moving from one place to another at the command of the LORD. They camped at Rephidim, but there was no water there to drink.
But the people were very thirsty and continued to complain to Moses. They said, "Why did you bring us out of Egypt? To kill us and our children and our livestock with thirst?"
The LORD said to Moses, "Take some of the leaders of Israel with you, and go on ahead of the people. Take along the stick with which you struck the Nile.
I will stand before you on a rock at Mount Sinai. Strike the rock, and water will come out of it for the people to drink." Moses did so in the presence of the leaders of Israel.
Moses said to Joshua, "Pick out some men to go and fight the Amalekites tomorrow. I will stand on top of the hill holding the stick that God told me to carry."
When Moses' arms grew tired, Aaron and Hur brought a stone for him to sit on, while they stood beside him and held up his arms, holding them steady until the sun went down.
Then the LORD said to Moses, "Write an account of this victory, so that it will be remembered. Tell Joshua that I will completely destroy the Amalekites."