The Amalekites1 came and attacked the Israelites at Rephidim.29
Moses said to Joshua,3 "Choose some of our men and go out to fight the Amalekites. Tomorrow I will stand on top of the hill with the staff4 of God in my hands."
So Joshua fought the Amalekites as Moses had ordered, and Moses, Aaron and Hur5 went to the top of the hill.
As long as Moses held up his hands, the Israelites were winning,6 but whenever he lowered his hands, the Amalekites were winning.
When Moses' hands grew tired, they took a stone and put it under him and he sat on it. Aaron and Hur held his hands up--one on one side, one on the other--so that his hands remained steady till sunset.713
So Joshua overcame the Amalekite8 army with the sword.
Then the LORD said to Moses, "Write9 this on a scroll as something to be remembered and make sure that Joshua hears it, because I will completely blot out10 the memory of Amalek11 from under heaven."
Moses built an altar12 and called13 it The LORD is my Banner.
He said, "For hands were lifted up to the throne of the LORD. Thea LORD will be at war against the Amalekites14 from generation to generation."15