who ruled spain over 700 years ?