The Amalekites then came and attacked Israel at Rephidim.
Moses said to Joshua, 'Pick some men and tomorrow morning go out and engage Amalek. I, for my part, shall take my stand on the hilltop with the staff of God in my hand.'
Joshua did as Moses had told him and went out to engage Amalek, while Moses, Aaron and Hur went up to the top of the hill.
As long as Moses kept his arms raised, Israel had the advantage; when he let his arms fall, the advantage went to Amalek.
But Moses' arms grew heavy, so they took a stone and put it under him and on this he sat, with Aaron and Hur supporting his arms on each side. Thus his arms remained unwavering till sunset,
and Joshua defeated Amalek, putting their people to the sword.