Exodus 17:8-16 recounts the battle at Rephidim, where the nomadic Amalekites attacked the Israelites. Joshua led the fighting against the Amalekites with the sword, while Moses, accompanied by Aaron and Hur, stood on a nearby hill holding the staff of God. When Moses's hands were raised, Israel prevailed, but when they lowered, Amalek gained the upper hand. Aaron and Hur supported Moses's arms until sunset, securing Israel's victory through this teamwork. God commanded Moses to record this event as a memorial, and Moses built an altar and named it "The Lord is My Banner" (Jehovah-Nissi), signifying God's eternal battle against the Amalekites.