 Medieval Spain was the scene of almost constant warfare between Muslims and Christians.The Taifa kingdoms lost ground to the Christian realms in the north.After the loss of Toledo in 1085, the Muslim rulers reluctantly invited the Almoravides, who invaded Al-Andalus from North Africa and established an empire.