In his drama La Numancia (1581--1585) Miguel de Cervantes presents a heroic but doomed pagan Iberian city. This city of some 3000 souls is under siege by a Roman army of some 80,000 soldiers (III vv. 1392--92). Such a numerical advantage guarantees a victorious outcome for Rome. But soon, the River Ebro prophesies that one day God will appoint as his vicars Ferdinand the Catholic and the Hapsburgh kings Charles V and Philip II.
At that time Catholic Spain will have become God's chosen people with all of its privileges and responsibilities. Under these three royal patriarchs Spain will avenge Numantias's defeat by humiliating Rome, and will be for all practical purposes the invincible ruler of the world (Ivv. 497--512).
Once Spain becomes God's chosen people it will be victorious regardless of how few soldiers it has and how many enemy soldiers there are in a given battle. My thesis is that this concept of military invincibility for a chosen people has its roots in the Bible, mainly but not exclusively in the Old Testament.
In this context Cervantes's La Numanica promises a time when Spain and God will have a covenant the way that the Children of Israel had their covenant with Him as well (Genesis 12:2, 26:4-- 5). As long as the Children of Israel obeyed Him, God, the Divine Warrior, fought at their side. If they disobeyed Him they lost their battles, regardless of their numerical advantage (Joshuah 6:18--19).
Thus by extension as long as Spain obeyed God's demands she too could not lose. These many Spanish victories would be a sign of God's approval of Spain's behavior. But Spain acted very cruelly not only abroad, but to its own semitic minorities as well. If Spain did not mend its ways then surely it was in for difficult times.
How would Cervantes have written La Numancia had he done so after 1588? Surely some of the play's characters would have asked, "In what ways have we sinned that God should punish us so?"