All the congregation of the children of Yisra'el journeyed from the wilderness of Sin, by their journeys, according to the LORD's mitzvah, and encamped in Refidim; but there was no water for the people to drink.
Therefore the people quarreled with Moshe, and said, "Give us water to drink." Moshe said to them, "Why do you quarrel with me? Why do you test the LORD?"
The people were thirsty for water there; and the people murmured against Moshe, and said, "Why have you brought us up out of Mitzrayim, to kill us, our children, and our livestock with thirst?"
Moshe cried to the LORD, saying, "What shall I do with these people? They are almost ready to stone me."
The LORD said to Moshe, "Walk on before the people, and take the Zakenim of Yisra'el with you, and take the rod in your hand with which you struck the Nile, and go.
Behold, I will stand before you there on the rock in Horev. You shall strike the rock, and water will come out of it, that the people may drink." Moshe did so in the sight of the Zakenim of Yisra'el.
He called the name of the place Massah, and Merivah, because the children of Yisra'el quarreled, and because they tested the LORD, saying, "Is the LORD among us, or not?"
Then `Amalek came and fought with Yisra'el in Refidim.
Moshe said to Yehoshua, "Choose men for us, and go out, fight with `Amalek. Tomorrow I will stand on the top of the hill with God's rod in my hand.
So Yehoshua did as Moshe had told him, and fought with `Amalek; and Moshe, Aharon, and Hur went up to the top of the hill.
It happened, when Moshe held up his hand, that Yisra'el prevailed; and when he let down his hand, `Amalek prevailed.
But Moshe' hands were heavy; and they took a stone, and put it under him, and he sat on it. Aharon and Hur held up his hands, the one on the one side, and the other on the other side. His hands were steady until sunset.
Yehoshua defeated `Amalek and his people with the edge of the sword.
The LORD said to Moshe, "Write this for a memorial in a book, and rehearse it in the ears of Yehoshua: that I will utterly blot out the memory of `Amalek from under the sky."
Moshe built an altar, and called the name of it the LORD our Banner
He said, "The LORD has sworn: 'The LORD will have war with `Amalek from generation to generation.'"