Original: Twenty-three different emirs ruled Granada from the founding of the dynasty in 1232 by Muhammed I ibn Nasr until January 2 , 1492 , when Muhammad XII surrendered to the Christian Spanish kingdoms of Aragon and Castile .
Simplified: The Nasrid dynasty came to power after the defeat of the Almohad dynasty in 1212 at the Battle of Las Navas de Tolosa .