The Christian king Alfonso II of Asturias died in 842 and was succeeded by his nephew, Ramiro I of Asturias.

Meanwhile, in Christian circles the legend grew that James, a disciple of Jesus, had gone to Spain, founded the Church there, and provided protection for the Christians.
Historians have found no evidence for these old claims.
Old bones that were discovered were venerated as his relics.

The legend was that a battle took place.
On Alfonso's death, the Moors demanded the reinstatement of the tribute of 100 virgins (fifty noble and fifty common), which Alfonso had defied.
Ramiro denied them the tribute and prepared for battle.
On the night before the Battle of Clavijo he dreamt of St. James, who told him that God had chosen James as the patron for the Spanish kingdoms.

According to the legend, James appeared as a warrior on his white horse with a  white banner to help Christian armies of King Ramiro I in battle against the Moors.
The Christians marched on the cry of ¡Dios ayuda a Santiago! "
God save St. James!".
They slew more than 5000 Muslims and James became known as "Matamoros".
The Christian king Alfonso II of Asturias died in 842 and was succeeded by his nephew, Ramiro I of Asturias.
Meanwhile, in Christian circles the legend grew that James, a disciple of Jesus, had gone to Spain, founded the Church there, and provided protection for the Christians. Historians have found no evidence for these old claims. Old bones that were discovered were venerated as his relics.
The legend was that a battle took place. On Alfonso's death, the Moors demanded the reinstatement of the tribute of 100 virgins (fifty noble and fifty common), which Alfonso had defied. Ramiro denied them the tribute and prepared for battle. On the night before the Battle of Clavijo he dreamt of St. James, who told him that God had chosen James as the patron for the Spanish kingdoms.
According to the legend, James appeared as a warrior on his white horse with a  white banner to help Christian armies of King Ramiro I in battle against the Moors. The Christians marched on the cry of ¡Dios ayuda a Santiago! "God save St. James!". They slew more than 5000 Muslims and James became known as "Matamoros".
Saint James Matamoros