The Amalekites came and attacked the Israelites at Rephidim.Moses said to Joshua,“ Choose some of our men and go out to fight the Amalekites. Tomorrow I will stand on top of the hill with the staff of God in my hands.”So Joshua fought the Amalekites as Moses had ordered, and Moses, Aaron and Hur went to the top of the hill.As long as Moses held up his hands, the Israelites were winning, 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.So Joshua overcame the Amalekite army with the sword.Then the Lord said to Moses,“ Write this on a scroll as something to be remembered and make sure that Joshua hears it, because I will completely blot out the name of Amalek from under heaven.”Moses built an altar and called it The Lord is my Banner.He said,“ Because hands were lifted up against the throne of the Lord, the Lord will be at war against the Amalekites from generation to generation.” (niv)
“ Treat the Midianites as enemies and kill them.They treated you as enemies when they deceived you in the Peor incident involving their sister Kozbi, the daughter of a Midianite leader, the woman who was killed when the plague came as a result of that incident.” (niv)