The Nasrid dynasty (1232-1492) was established by Muhammad I Ibn Nasr who belonged to the the Arab family ruling Jaen. Extending its borders southwards, the dynasty stretched from Tarifa on the west coast to beyond Almeria on the east. However, it was sandwiched between Christian kingdoms in the north and African sultanates in the south and so its history was marked by alternate agreements with one side over the other in exchange for territorial concessions or heavy taxes. In 1236, Muhammad I joined forces with the Catholic monarch Fernando III to conquer Cordoba in exchange for the city of Granada, which was to rule over Almeria and Malaga. The marriage of the Catholic Monarchs Isabel and Fernando heralded the end of the Nasrid dynasty. The reign of the penultimate king Muley Hacén was marked by constant uprisings and major civil discontent. To complicate matters still further, there was infighting between his wife (Aixa) and his Christian favourite (Zoraya) as to which of their respective sons should be the future heir.