After leaving the wilderness of Sin, Israel encamped at Rephidim and found no water to drink. The people quarreled with Moses and questioned whether the Lord was truly among them.
At God's direction Moses took elders of Israel and struck the rock at Horeb with his staff. Water came from the rock, and Moses named the place Massah and Meribah because of Israel's testing and quarreling.
Rephidim was also the location of Israel's first recorded military battle after leaving Egypt. Amalek attacked Israel, and Joshua led Israelite fighters while Moses stood above the battlefield holding up the staff of God.
When Moses' hands became weary, Aaron and Hur supported them until Joshua defeated the Amalekite force. Moses subsequently built an altar called The Lord Is My Banner.