The Emirate of Granada (Arabic: إمارة غرﻧﺎﻃﺔ, transliteration: Imarat Gharnāṭah), also known as the Nasrid Kingdom of Granada (Spanish: Reino Nazarí de Granada), was an emirate established in 1238 following the defeat of Muhammad an-Nasir of the Almohad dynasty by an alliance of Christian kingdoms at the Battle of Las Navas de Tolosa in 1212. After Prince Idris left Iberia to take the Almohad leadership, the ambitious Mohammed I ibn Nasr established the last Muslim dynasty on the Iberian peninsula - the Nasrids. The Nasrid emirs were responsible for building the Alhambra palace complex as it is known today. By 1250, the Emirate was the last part of the Iberian peninsula held by the Muslims. Andalusian Arabic was the official language and mother tongue of the majority of the population. For two more centuries, the region enjoyed considerable cultural and economic prosperity.
The Emirate's attack on the Castilian frontier town of Zahara in December 1481 led to a prolonged war. The Granada War began in 1482, with Christian forces capturing Alhama de Granada in February 1482. This marked the beginning of a grinding 10-year war. The Christian force was made up of troops provided by Castilian nobles, towns, and the Santa Hermandad, as well as Swiss mercenaries. The Catholic Church also encouraged other Christian countries to offer their troops and their finances to the war effort. Meanwhile, civil war erupted in Granada as a result of succession struggles in the Nasrid ruling house. Castile used this internal strife as an opportunity to push further into Granada. By 1491, the city of Granada itself lay under siege. On November 25, 1491, the Treaty of Granada was signed, setting out the conditions for surrender. On January 2, 1492, the last Muslim leader, Muhammad XII, known as Boabdil to the Spanish, gave up complete control of Granada, to Ferdinand and Isabella, Los Reyes Católicos ("The Catholic Monarchs").