Exodus 17:10-13

10 Joshua did as Moses had told him, and fought against Amalek, while Moses, Aaron, and Hur went up to the top of the hill.
11 While Moses held up his hand,a Israel prevailed, but whenever he put his handb down, Amalek prevailed.
12 When Moses' hands grew heavy, they took a stone and put [it] under him, and he sat down on it. Then Aaron and Hur supported his hands, one on one side and one on the other so that his hands remained steady until the sun went down.
13 So Joshua defeated Amalek and his armyc with the sword.