For 780 years, Spaniards fought to expel the Muslim invaders that had taken control of most of the Iberian peninsula.