The Battle of Las Navas de Tolosa, known in Arab history as the Battle of Al-Uqab (معركة العقاب), took place on 16 July 1212 and was an important turning point in the Reconquista and in the medieval history of Spain.The forces of King Alfonso VIII of Castile were joined by the armies of his Christian rivals, Sancho VII of Navarre, Pedro II of Aragon and Afonso II of Portugal in battle against the Almohad rulers of the southern half of the Iberian Peninsula. The Caliph al-Nasir (Miramamolín in the Spanish chronicles) led the Almohad army, made up of people from the whole Almohad empire.
Alfonso crossed the mountain range that defended the Almohad camp, sneaking through the Despeñaperros Pass, being led by a local shepherd that knew the area. The Christian coalition caught the Moorish army at camp almost by surprise.
The crushing defeat of the Almohads significantly hastened their decline both in the Iberian Peninsula and in the Maghreb a decade later.
This is a very simple resume of the facts please check appropriate sources, thanks.