The Amalekites, descendants of Esau, attack the people of Israel at camp Rephidim, not far from Mount Sinai.The Israelites have to learn in the wilderness to trust in God in all circumstances.
Not only trust that the Lord gives water from the rock and manna for food, they also have to trust in His help when being attacked by the enemy.
Moses instructs Joshua to go to war against Amalek, but in that battle, victory is only possible by God’s help.
Israel is God’s people, and who fights against Israel, fights against God.
See Exodus 17 verse 16. Moses holds up the staff - like a banner on a battle-field - and God performed many miracles in Egypt, in response to this act of faith.
When Moses, because of weariness, lowers his hands with the staff, the Amalekites prevail. Aaron and Hur help Moses hold up the staff. Then the Israelites defeat Amalek.
Psalm 20 verse 6 to 8:
Now I know that the LORD saves His anointed;
He will answer him from His holy heaven
with the saving might of His right hand.
Some trust in chariots and some in horses,
but we trust in the name of the LORD our God.
They collapse and fall,
but we rise and stand upright.
See Isaiah 31, which mentions the Lord’s battle for Zion, that is Jerusalem.
Christians are allowed to share in the blessing of God’s covenant with Abraham.
In the spiritual warfare they face against demonic powers, they can only overcome if they are clothed with ‘the whole armor of God'.
Ephesians 6 verse 10 to 18.