The Moors suffered a major setback in 1212 at the battle of Navas de Tolosa in northern Andalusia, but they still clung to the kingdom of Granada and were only finally evicted from there in 1492.
The Moors thrived at Navas de Tolosa.